package cn.ffcs.uec.view.action;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.URLEncoder;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.zkoss.util.media.AMedia;
import org.zkoss.web.servlet.Servlets;
import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Components;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Filedownload;

import cn.ffcs.raptornuke.plugin.common.zk.ctrl.BasePortletComposer;
import cn.ffcs.raptornuke.plugin.common.zk.util.ZkUtil;
import cn.ffcs.raptornuke.portal.kernel.xml.DocumentException;
import cn.ffcs.raptornuke.portal.theme.ThemeDisplay;
import cn.ffcs.uec.common.vo.UecBdDefdoc;
import cn.ffcs.uec.recordsApproval.util.ApprovalUtil;
import cn.ffcs.uec.staff.manager.UecAssManager;
import cn.ffcs.uec.staff.manager.UecDocEduManager;
import cn.ffcs.uec.staff.manager.UecEncManager;
import cn.ffcs.uec.staff.manager.UecNationdutyManager;
import cn.ffcs.uec.staff.manager.UecTalentTeamManager;
import cn.ffcs.uec.staff.manager.UecTitleManager;
import cn.ffcs.uec.staff.manager.UecWorkManager;
import cn.ffcs.uec.staff.model.UecAss;
import cn.ffcs.uec.staff.model.UecDocEdu;
import cn.ffcs.uec.staff.model.UecEnc;
import cn.ffcs.uec.staff.model.UecNationduty;
import cn.ffcs.uec.staff.model.UecTalentTeam;
import cn.ffcs.uec.staff.model.UecTitle;
import cn.ffcs.uec.staff.model.UecWork;
import cn.ffcs.uec.staffAndOutStaff.vo.StaffAndOutStaff;
import cn.ffcs.uec.view.action.bean.ChartStaffInfomationMainBean;
import cn.ffcs.uec.view.manager.LogDownManager;
import cn.ffcs.uec.view.manager.UecArticleManager;
import cn.ffcs.uec.view.manager.UecImportantWorkManager;
import cn.ffcs.uec.view.manager.UecInnovationManager;
import cn.ffcs.uec.view.manager.UecStaffAllManager;
import cn.ffcs.uec.view.model.LogDown;
import cn.ffcs.uec.view.model.UecArticle;
import cn.ffcs.uec.view.model.UecImportantWork;
import cn.ffcs.uec.view.model.UecInnovation;
import cn.ffcs.uec.view.model.UecStaffAll;
import cn.ffcs.uom.common.model.DefaultDaoFactory;
import cn.ffcs.uom.common.util.ApplicationContextUtil;
import cn.ffcs.uom.common.util.IPortletInfoProvider;
import cn.ffcs.uom.common.util.PlatformUtil;
import cn.ffcs.uom.common.util.StrUtil;
import cn.ffcs.uom.common.util.UomZkUtil;

import com.itextpdf.text.BaseColor;
import com.itextpdf.text.Document;
import com.itextpdf.text.Element;
import com.itextpdf.text.Font;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPRow;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
/**
 * @desc 内蒙古电信公司专家推荐表
 * @author BMP
 * @time 2019-08-18
 */
@Controller
@Scope("prototype")
public class ChartStaffInfomationMainComposer extends BasePortletComposer
		implements IPortletInfoProvider {
	private static final long serialVersionUID = -139335897781983790L;
	private ChartStaffInfomationMainBean bean = new ChartStaffInfomationMainBean();
	
	//private UecOutStaffInfomationVo uecOutStaffInfomationVo = new UecOutStaffInfomationVo();
	
	private UecStaffAll uecStaffAll = new UecStaffAll();
	
	//方便人员转换
	private StaffAndOutStaff staffAndOutStaff = new StaffAndOutStaff();

	private UecStaffAllManager uecStaffAllManager = (UecStaffAllManager) ApplicationContextUtil
			.getBean("uecStaffAllManager");
	private UecAssManager uecAssManager = (UecAssManager) ApplicationContextUtil
			.getBean("uecAssManager");
	private UecWorkManager uecWorkManager = (UecWorkManager) ApplicationContextUtil
			.getBean("uecWorkManager");
	private UecEncManager uecEncManager = (UecEncManager) ApplicationContextUtil
			.getBean("uecEncManager");
	private UecDocEduManager uecEduManager = (UecDocEduManager) ApplicationContextUtil
			.getBean("uecDocEduManager");
	//专业技术职务
	private UecTitleManager uecTitleManager = (UecTitleManager) ApplicationContextUtil
			.getBean("uecTitleManager");
	//专家人才
	private UecTalentTeamManager uecTalentTeamManager = (UecTalentTeamManager) ApplicationContextUtil
			.getBean("uecTalentTeamManager");
	//职业资格
	private UecNationdutyManager uecNationDutyManager = (UecNationdutyManager) ApplicationContextUtil
			.getBean("uecNationdutyManager");
	//下载日志
	private LogDownManager logDownManager = (LogDownManager) ApplicationContextUtil
			.getBean("logDownManager");
	//参加专业工作情况
		private UecImportantWorkManager uecImportantWorkManager = (UecImportantWorkManager) ApplicationContextUtil
				.getBean("uecImportantWorkManager");
		//创新结果
		private UecInnovationManager uecInnovationManager = (UecInnovationManager) ApplicationContextUtil
				.getBean("uecInnovationManager");
		//论文专著
		private UecArticleManager uecArticleManager = (UecArticleManager) ApplicationContextUtil
				.getBean("uecArticleManager");	
	private SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:MM:SS");
	String downflag="否";
	private LogDown logDown;
	
	private String talentCategory="";
	private String childTalent="";
	
	
	//近三年参加专业工作情况(本单位)
	List<UecImportantWork> uecImportantByPkPsndocb = null;
	//近三年参加专业工作情况(集团)
	List<UecImportantWork> uecImportantByPkPsndocj = null;
	//论文专著
	List<UecArticle> uecArticleByPkPsndoc = null;
	//创新结果
	List<UecInnovation> uecInnovationByPkPsndoc =null;
	
	//参加专业工作情况(本单位)
	List<UecImportantWork> uecImportantByPkPsndocbList = null;
	//近三年参加专业工作情况(集团)
	List<UecImportantWork> uecImportantByPkPsndocjList = null;
	//论文专著
	List<UecArticle> uecArticleByPkPsndocList = null;
	//创新结果
	List<UecInnovation> uecInnovationByPkPsndocList =null;
	
	@Override
	public String getPortletId() {
		return super.getPortletId();
	}

	@Override
	public ThemeDisplay getThemeDisplay() {
		return super.getThemeDisplay();
	}

	@Override
	public void doAfterCompose(Component comp) throws Exception {
		super.doAfterCompose(comp);
		UomZkUtil.autoFitHeight(comp);
		Components.wireVariables(comp, bean);
	}

	/**
	 * 初始化窗口
	 * 
	 * @throws ParseException
	 * @throws InterruptedException 
	 */
	public void onCreate$chartStaffInfomationMainWin() throws ParseException, InterruptedException {
		//this.bindCombobox();
		talentCategory="";
		childTalent="";
		getList();
		try {
			if (StrUtil.isNullOrEmpty(PlatformUtil.getCurrentUser())) {
				ZkUtil.showError("当前登录用户不存在!", "错误提示");
				return;
			} else {
				logDown = new LogDown();
				String screenName = PlatformUtil.getCurrentUser().getScreenName();
				if("n".equals(screenName.substring(0,1).toLowerCase())) {
					screenName=screenName.substring(1);
					logDown.setStaffCatogery("合同制员工");
				}else {
					logDown.setStaffCatogery("外包员工");
				}
				uecStaffAll.setCode(screenName.toUpperCase());
				uecStaffAll = uecStaffAllManager.findUecStaffAll(uecStaffAll);
			}
			if (null == uecStaffAll) {
				bean.getSavePdf().setDisabled(true);
				Messagebox.show("人员信息获取失败！");
				return;
			}else {
				staffAndOutStaff.setPkPsndoc(uecStaffAll.getPkpsndoc());
				//保存数据到log_down  日志操作
				SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:MM:SS");
				logDown.setPkPsndoc(uecStaffAll.getPkpsndoc());
				boolean flag = getLogDown(logDown);//判断数据库里是否已经存在，以免初次登录重新添加
				if(flag) {
					talentCategory=!StrUtil.isNullOrEmpty(logDown.getTalentname())?logDown.getTalentname():"";
					childTalent=!StrUtil.isNullOrEmpty(logDown.getChildtalentname())?logDown.getChildtalentname():"";
					String talentSwitch = ApprovalUtil.getTalentSwitch();
					if("open".equals(talentSwitch)) {	
					if("N".equals(logDown.getOpenswitch())) {
				    		bean.getSubmitButton().setVisible(true);
				    		//bean.getSaveButton().setVisible(true);
				    		bean.getYetSubmitButton().setVisible(false);
				    	}else {
				    		bean.getSubmitButton().setVisible(false);
				    		//bean.getSaveButton().setVisible(false);
				    		bean.getYetSubmitButton().setVisible(true);
				    	}
					}else {
						bean.getSubmitButton().setVisible(false);
			    		bean.getRefrshButton().setVisible(false);
			    		bean.getYetSubmitButton().setVisible(false);
			    		bean.getSavePdf().setVisible(false);
					}
				}
				if(!flag) {
					bean.getSubmitButton().setVisible(true);
		    		//bean.getSaveButton().setVisible(true);
		    		bean.getYetSubmitButton().setVisible(false);
				//logDown=new LogDown();
				logDown.setDowntime(df.format(new Date()));
				logDown.setPkPsndoc(uecStaffAll.getPkpsndoc());
				logDown.setName(uecStaffAll.getName());
				logDown.setCode(uecStaffAll.getCode());
				logDown.setBirthdate(uecStaffAll.getBIRTHDATE());
				logDown.setDownflag(downflag);
				logDown.setSex(uecStaffAll.getSex());
				logDown.setEnterunittime(uecStaffAll.getEnterunittime());
				logDown.setJoinworkdate((!StrUtil.isNullOrEmpty(uecStaffAll.getJoinworkdate())?uecStaffAll.getJoinworkdate():""));
				logDown.setPartyName((!StrUtil.isNullOrEmpty(uecStaffAll.getPartyname())?uecStaffAll.getPartyname():""));
				logDown.setOpenswitch("N");
				logDown.setCreatetime(df.format(new Date()));
				logDown.setMobile((!StrUtil.isNullOrEmpty(uecStaffAll.getMobile())?uecStaffAll.getMobile():""));
				logDown.setEmail((!StrUtil.isNullOrEmpty(uecStaffAll.getEmail())?uecStaffAll.getEmail():""));
				logDown.setWorkforg((!StrUtil.isNullOrEmpty(uecStaffAll.getForgname())?uecStaffAll.getForgname():""));
				logDown.setWorkorg((!StrUtil.isNullOrEmpty(uecStaffAll.getOrgname())?uecStaffAll.getOrgname():""));
				logDown.addOnly();
				}
			}
			
			
			byte[] bsPdfView = createPDF(talentCategory,childTalent);
			org.zkoss.util.media.Media media = new AMedia(null, null, "application/PDF", bsPdfView);
            bean.getIframePdf().setHeight("600px");
            bean.getIframePdf().setContent(media);
		} catch (DocumentException e) {			
			e.printStackTrace();
		} catch (IOException e) {			
			e.printStackTrace();
		} catch (com.itextpdf.text.DocumentException e) {
			e.printStackTrace();
		}
	}

	

	/**
	 * @throws ParseException 
	 * @throws InterruptedException
	 *             员工报名表导出按钮，通过按钮触发
	 * @Title: onOk
	 * @Description: TODO
	 * @param:
	 * @return: void
	 * @throws
	 */
	public void onOk() throws InterruptedException, ParseException {
		try {
			if(getLogDown(logDown)) {
				if("N".equals(logDown.getOpenswitch())) {
					byte[] bsPdf = createPDF(talentCategory,childTalent);
					getList();
					if(uecInnovationByPkPsndocList == null || uecInnovationByPkPsndocList.size()<=0) {
						Messagebox.show("近三年创新成果不可为空，若是没有，需要在目录个人信息维护项中，维护创新成果里 项目名称为无");
						return;
					}
					if( uecArticleByPkPsndocList==null || uecArticleByPkPsndocList.size()<=0) {
						Messagebox.show("近三年论文、专著不可为空，若是没有，需要在目录个人信息维护项中，维护论文专著里 论文名称为无");
						return;
					}
					if((uecImportantByPkPsndocbList == null || uecImportantByPkPsndocbList.size()<=0) && (uecImportantByPkPsndocjList==null || uecImportantByPkPsndocjList.size()<=0)) {
						Messagebox.show("近三年参加重大项目或重点专题工作情况不可为空，若是没有，需要在目录个人信息维护项中，维护近三年参加重大项目或重点专题工作情况成里项目名称为无");
						return;
					}
					String charset = "UTF-8";
		            // 图片名称
		            String fileName = uecStaffAll.getName()+"报名表";
		            // 编码后文件名
		            String encodedName = null;
		            encodedName = URLEncoder.encode(fileName, charset);
		            // 将空格替换为+号
		            encodedName = encodedName.replace("%20", "+");
		            HttpServletRequest httpRequest = (HttpServletRequest) Executions.getCurrent()
		                    .getNativeRequest();
		            // 解决ie6 bug 或者是火狐浏览器
		            if (encodedName.length() > 150 || Servlets.isGecko(httpRequest)
		                    || Servlets.isGecko3(httpRequest)) {
		                encodedName = new String(fileName.getBytes(charset), "ISO8859-1");
		            }
					Filedownload.save(bsPdf, "application/PDF", fileName);
				}else {
					Messagebox.show("您已报名!");
				}
			}
			
			
		} catch (DocumentException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (com.itextpdf.text.DocumentException e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * 提交按钮
	 * @throws Exception
	 */
	public void onSubmit() throws Exception {
		if(logDown != null) {
			getList();
			if(uecInnovationByPkPsndocList == null || uecInnovationByPkPsndocList.size()<=0) {
				Messagebox.show("近三年创新成果不可为空，若是没有，需要在目录个人信息维护项中，维护创新成果里 项目名称为无");
				return;
			}
			if( uecArticleByPkPsndocList==null || uecArticleByPkPsndocList.size()<=0) {
				Messagebox.show("近三年论文、专著不可为空，若是没有，需要在目录个人信息维护项中，维护论文专著里 论文名称为无");
				return;
			}
			if((uecImportantByPkPsndocbList == null || uecImportantByPkPsndocbList.size()<=0) && (uecImportantByPkPsndocjList==null || uecImportantByPkPsndocjList.size()<=0)) {
				Messagebox.show("近三年参加重大项目或重点专题工作情况不可为空，若是没有，需要在目录个人信息维护项中，维护近三年参加重大项目或重点专题工作情况成里项目名称为无");
				return;
			}
			ZkUtil.showQuestion("提交之后所有信息不可更改，确定要提交吗?", "提示信息", new EventListener() {
				public void onEvent(Event event) throws Exception {
					Integer result = (Integer) event.getData();
					if (result == Messagebox.OK) {
						logDown.setOpenswitch("Y");
						downflag="是";
						logDown.setDowntime(df.format(new Date()));
						logDown.setDownflag(downflag);
					    logDown.updateOnly();
					    Messagebox.show("报名成功！");
						onRefresh();
					}
				}
			});
		}else {
			Messagebox.show("提交失败");
			this.onRefresh();
		}

	}
	/**
	 * @throws ParseException 
	 * @throws InterruptedException
	 *             员工报名表导出按钮，通过按钮触发
	 * @Title: onOk
	 * @Description: TODO
	 * @param:
	 * @return: void
	 * @throws
	 */
	public void onRefresh() throws InterruptedException, ParseException {
		try {
			boolean flag = getLogDown(logDown);//判断数据库里是否已经存在，以免初次登录重新添加
			uecStaffAll = uecStaffAllManager.findUecStaffAll(uecStaffAll);
			if(flag) {
				talentCategory=!StrUtil.isNullOrEmpty(logDown.getTalentname())?logDown.getTalentname():"";
				childTalent=!StrUtil.isNullOrEmpty(logDown.getChildtalentname())?logDown.getChildtalentname():"";
			}
			if("N".equals(logDown.getOpenswitch())) {
	    		bean.getSubmitButton().setVisible(true);
	    		//bean.getSaveButton().setVisible(true);
	    		bean.getYetSubmitButton().setVisible(false);
	    	}else {
	    		bean.getSubmitButton().setVisible(false);
	    		//bean.getSaveButton().setVisible(false);
	    		bean.getYetSubmitButton().setVisible(true);
	    	}
			byte[] bsPdf = createPDF(talentCategory,childTalent);
			talentCategory="";
			childTalent="";
			org.zkoss.util.media.Media media = new AMedia(null, null, "application/PDF", bsPdf);
	        bean.getIframePdf().setHeight("600px");
	        bean.getIframePdf().setContent(media);
		} catch (DocumentException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (com.itextpdf.text.DocumentException e) {
			e.printStackTrace();
		}
	}

	/**
	 * @throws com.itextpdf.text.DocumentException
	 * @desc 生成pdf
	 * @return: byte[] pdf二进制文件
	 * @throws DocumentException
	 * @throws IOException
	 * @throws com.itextpdf.text.DocumentException
	 * @throws ParseException 
	 * @throws InterruptedException
	 */
	public byte[] createPDF(String joinCategory,String childTalent) throws DocumentException,
			IOException, com.itextpdf.text.DocumentException, ParseException {
		// 考核
		List<UecAss> findUecAssByStaffId = uecAssManager
				.findUecAssByPkPsndoc(staffAndOutStaff);
		// 教育
		List<UecDocEdu> uecDocEduByUecOutStaffId = uecEduManager
				.findUecDocEduByPkPsndoc(staffAndOutStaff);
		//近三年参加专业工作情况(本单位)
		 uecImportantByPkPsndocb = uecImportantWorkManager.findUecImportantByPkPsndocAndDiffDate(staffAndOutStaff,"本单位");
		//近三年参加专业工作情况(集团)
		uecImportantByPkPsndocj = uecImportantWorkManager.findUecImportantByPkPsndocAndDiffDate(staffAndOutStaff,"集团");
		//论文专著
		uecArticleByPkPsndoc = uecArticleManager.findUecArticleByPkPsndoc(staffAndOutStaff);
		//创新结果
		uecInnovationByPkPsndoc = uecInnovationManager.findUecInnovationByPkPsndoc(staffAndOutStaff);
		String allstudy="";//全日制
		String studyMode="1001A1100000000006B4";
		ArrayList<String> strArrayAll = new ArrayList<String> ();
		strArrayAll.add("1001A1100000000006B4");
		strArrayAll.add("1001A1100000000006B5");
		strArrayAll.add("1001A1100000000006B6");
		strArrayAll.add("1001A1100000000006B7");
		strArrayAll.add("1001A1100000000006B8");
		String zaistudy="";//在职
		String studyMode1="1001A1100000000006B9";
		ArrayList<String> strArrayZai = new ArrayList<String> ();
		strArrayZai.add("1001A1100000000006B9");
		strArrayZai.add("1001A1100000000006BA");
		strArrayZai.add("1001A1100000000006BB");
		strArrayZai.add("1001A1100000000006BC");
		strArrayZai.add("1001A1100000000006BD");
		strArrayZai.add("1001A1100000000006BE");
		strArrayZai.add("1001A1100000000006BF");
		strArrayZai.add("1001A1100000000006BG");
		strArrayZai.add("1001A1100000000006BH");
		strArrayZai.add("1001A1100000000006BI");
		if(uecDocEduByUecOutStaffId!=null) {
			for (UecDocEdu uecdocedu:uecDocEduByUecOutStaffId) {
			//	if(uecdocedu.getStudymode().equals(studyMode)) {
					if(strArrayAll.contains(uecdocedu.getStudymode())) {
					allstudy=allstudy+(!StrUtil.isNullOrEmpty(uecdocedu.getEducationName())?uecdocedu.getEducationName():"无")+"；"
				            +(!StrUtil.isNullOrEmpty(uecdocedu.getPkDegreeName())?uecdocedu.getPkDegreeName():"无")+"\r\n"
				            +(!StrUtil.isNullOrEmpty(uecdocedu.getBegindate())?dataTraslate(uecdocedu.getBegindate()):" ")+"-"+
							(!StrUtil.isNullOrEmpty(uecdocedu.getEnddate())?dataTraslate(uecdocedu.getEnddate()):" ")+"；"
				            +(!StrUtil.isNullOrEmpty(uecdocedu.getSchool())?uecdocedu.getSchool():"无")+"；"
				            +(!StrUtil.isNullOrEmpty(uecdocedu.getMajor())?uecdocedu.getMajor():"无")+"\r\n";
					continue;
				//}else if(uecdocedu.getStudymode().equals(studyMode1)) {
				}else if(strArrayZai.contains(uecdocedu.getStudymode())) {
					zaistudy=zaistudy+(!StrUtil.isNullOrEmpty(uecdocedu.getEducationName())?uecdocedu.getEducationName():"无")+"；"
				            +(!StrUtil.isNullOrEmpty(uecdocedu.getPkDegreeName())?uecdocedu.getPkDegreeName():"无")+"\r\n"
							+(!StrUtil.isNullOrEmpty(uecdocedu.getBegindate())?dataTraslate(uecdocedu.getBegindate()):" ")+"-"+
							(!StrUtil.isNullOrEmpty(uecdocedu.getEnddate())?dataTraslate(uecdocedu.getEnddate()):" ")+"；"
				            +(!StrUtil.isNullOrEmpty(uecdocedu.getSchool())?uecdocedu.getSchool():"无")+"；"
				            +(!StrUtil.isNullOrEmpty(uecdocedu.getMajor())?uecdocedu.getMajor():"无")+"\r\n";
					continue;
					
				}
			}
			allstudy=!StrUtil.isNullOrEmpty(allstudy)?allstudy:"无";
			zaistudy=!StrUtil.isNullOrEmpty(zaistudy)?zaistudy:"无";
		}else {
			allstudy="无";
			zaistudy="无";
		}
		// 专业技术职务
		List<UecTitle> uecTitleByUecOutStaffId=
		uecTitleManager.getUecTitleListByPkpsndoc(staffAndOutStaff);
		String uecTitleString="";
		if(uecTitleByUecOutStaffId!=null) {
			for(UecTitle ut:uecTitleByUecOutStaffId) {
				if(uecTitleByUecOutStaffId.size()==1 &&("".equals(ut.getPkTechposttitleName())||"无专业技术职务名称".equals(ut.getPkTechposttitleName()))) {
				   uecTitleString="无";
				   break;
				}else if("".equals(ut.getPkTechposttitleName())||"无专业技术职务名称".equals(ut.getPkTechposttitleName())){
					
					continue;
					
				}else {
					uecTitleString=uecTitleString+(!StrUtil.isNullOrEmpty(ut.getGlbdef4())?(dataTraslate(ut.getGlbdef4())):"")+"获得"+"    "+ut.getTitlerankName()+"     "
				             +ut.getPkTechposttitleName()+ "    "+ "\r\n";
				}
			}
		}else {
			 uecTitleString="无";
		}
		
		// 专家人才
		List<UecTalentTeam> uecTalentTeamByUecOutStaffId=
				uecTalentTeamManager.getUecTalentTeamListByPkpsndoc(staffAndOutStaff);
		String uecTalentTeamString="";
		if( uecTalentTeamByUecOutStaffId!=null) {
			for(UecTalentTeam utt:uecTalentTeamByUecOutStaffId) {
					String a=utt.getBegindate();
					String b=utt.getEnddate();
					if(!StrUtil.isNullOrEmpty(a)) {
						a=a.substring(0,4)+"."+a.substring(5,7);
					}
					if(!StrUtil.isNullOrEmpty(b)) {
						b=b.substring(0,4)+"."+b.substring(5,7);
					}
					//utt.getGlbdef1Name();
					utt.getGlbdef2Name();
					//utt.getGlbdef3Name();
					uecTalentTeamString=uecTalentTeamString+utt.getGlbdef2Name()+";"+a+" - "+b+";"+utt.getGlbdef3Name()+"\r\n";
				}
		}else {
			uecTalentTeamString="无";
		}
		
		// 职业资格
		List<UecNationduty> uecNationDutyByUecOutStaffId=
		uecNationDutyManager.getUecNationdutyListByPkpsndoc(staffAndOutStaff);
		String uecNationdutyString="";
		if( uecNationDutyByUecOutStaffId!=null) {
			for(UecNationduty un:uecNationDutyByUecOutStaffId) {
				if(uecNationDutyByUecOutStaffId.size()==1 &&("".equals(un.getWorknameName())||"无职业资格名称".equals(un.getWorknameName()))) {
					uecNationdutyString="无";
				   break;
				}else if("".equals(un.getWorknameName())||"无职业资格名称".equals(un.getWorknameName())){
					
					continue;
					
				}else {
					String a=un.getWorkdate();
					if(!StrUtil.isNullOrEmpty(a)) {
						//System.out.println("a+++"+a+"++++++"+a.substring(0,4)+"---bbb-----"+a.substring(5,7));
						a=a.substring(0,4)+"."+a.substring(5,7);
					}
					uecNationdutyString=uecNationdutyString+(!StrUtil.isNullOrEmpty(un.getWorklevelName())?un.getWorklevelName():"")+"     "+un.getWorknameName()+"    "+a+"\r\n";
				}
			}
		}else {
			uecNationdutyString="无";
		}
		//参加工作日期，
		String dataTemp="";
		if(!StrUtil.isNullOrEmpty(uecStaffAll.getJoinworkdate())) {
			dataTemp=uecStaffAll.getJoinworkdate();
		}
		if(!"".equals(dataTemp) && dataTemp!=null) {
			dataTemp=StrTraslateFormat(dataTemp);
			/*if("/".equals(dataTemp.substring(6,7)) || "-".equals(dataTemp.substring(6,7))) {
				dataTemp=dataTemp.substring(0,5)+"0"+dataTemp.substring(5,6);
			}*/
		}
		
		//履历情况
				List<UecWork> queryPageInfoByUecStaffId = uecWorkManager
						.findUecWorkByPkPsndoc(staffAndOutStaff);
				String uecworkString="";
				if( queryPageInfoByUecStaffId!=null && queryPageInfoByUecStaffId.size()>0) {
					for(UecWork uecWork:queryPageInfoByUecStaffId) {
							uecWork.getDataCollection();
							uecworkString=uecworkString+(!StrUtil.isNullOrEmpty(uecWork.getWorkcorp())?uecWork.getWorkcorp():"--")+
									    "     "+(!StrUtil.isNullOrEmpty(uecWork.getWorkdept())?uecWork.getWorkdept():"--")+"    "+(!StrUtil.isNullOrEmpty(uecWork.getWorkpost())?uecWork.getWorkpost():"--")+"\r\n";
						}
				}else {
					uecworkString="无";
				}
				// 奖励
				String uecEncString="";
				List<UecEnc> findUecEncByOutStaffId = uecEncManager
						.findUecEncByPkPsndoc(staffAndOutStaff);	
				if(findUecEncByOutStaffId != null && findUecEncByOutStaffId.size()>0) {
					for(UecEnc uecEnc:findUecEncByOutStaffId) {
						uecEncString=uecEncString+(!StrUtil.isNullOrEmpty(uecEnc.getDataCollection())?uecEnc.getDataCollection():"--")+"    "+
								(!StrUtil.isNullOrEmpty(uecEnc.getGlbdef1())?uecEnc.getGlbdef1():"--")+"    "+(!StrUtil.isNullOrEmpty(uecEnc.getEncourorg())?uecEnc.getEncourorg():"--")+"    "+
								(!StrUtil.isNullOrEmpty(uecEnc.getEncourrankName())?uecEnc.getEncourrankName():"--")+"\r\n";
					}
				}else {
					uecEncString="无";
				}
				//近三年参加专业工作情况(本单位)
				String uecImportantString=""; 
				uecImportantByPkPsndocb = uecImportantWorkManager.findUecImportantByPkPsndocAndDiffDate(staffAndOutStaff,"本单位");
				if(uecImportantByPkPsndocb != null && uecImportantByPkPsndocb.size()>0) {
					for(UecImportantWork uecImportantWork:uecImportantByPkPsndocb) {
						if(!"无".equals(uecImportantWork.getWorkName())) {
						uecImportantString=uecImportantString+StrTraslate(uecImportantWork.getJoindate())+"    "+uecImportantWork.getWorkName()+"    "+
								"项目角色："+
							    (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleProjectName())?uecImportantWork.getRoleProjectName():"")+
							    "制定方案和方法角色："
							    + (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleMakeName())?uecImportantWork.getRoleMakeName():"")+"    "+(!StrUtil.isNullOrEmpty(uecImportantWork.getWorkResult())?uecImportantWork.getWorkResult():"")+"\r\n";
					  }
					}
				}else {
					uecImportantString="无";
				}
				 
				 //近三年参加专业工作情况(集团)
				uecImportantByPkPsndocj = uecImportantWorkManager.findUecImportantByPkPsndocAndDiffDate(staffAndOutStaff,"集团");
				String uecImportantJString=""; 
				uecImportantByPkPsndocb = uecImportantWorkManager.findUecImportantByPkPsndocAndDiffDate(staffAndOutStaff,"本单位");
				if(uecImportantByPkPsndocb != null && uecImportantByPkPsndocb.size()>0) {
					for(UecImportantWork uecImportantWork:uecImportantByPkPsndocb) {
						uecImportantJString=uecImportantJString+
								
								(!StrUtil.isNullOrEmpty(uecImportantWork.getJoindate())?StrTraslate(uecImportantWork.getJoindate()):"")+"    "+uecImportantWork.getWorkName()+"    "+
								"项目角色："+
							    (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleProjectName())?uecImportantWork.getRoleProjectName():"")+"    "+
							    "制定方案和方法角色："
							    + (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleMakeName())?uecImportantWork.getRoleMakeName():"")+"    "+(!StrUtil.isNullOrEmpty(uecImportantWork.getWorkResult())?uecImportantWork.getWorkResult():"")+"\r\n";
					}
				}else {
					uecImportantJString="无";
				}
				//论文专著
				uecArticleByPkPsndoc = uecArticleManager.findUecArticleByPkPsndoc(staffAndOutStaff);
				String uecArticleString="";
				if(uecArticleByPkPsndoc != null && uecArticleByPkPsndoc.size()>0) {
					for(UecArticle uecArticle :uecArticleByPkPsndoc) {
						if(!"无".equals(uecArticle.getArticleName())) {
							uecArticleString=uecArticleString+StrTraslate(uecArticle.getPublicationDate())+"    "+
							(!StrUtil.isNullOrEmpty(uecArticle.getPublicationName())?uecArticle.getPublicationName():"")+"    "+
						     (!StrUtil.isNullOrEmpty(uecArticle.getArticleName())?uecArticle.getArticleName():"")+"    "+
						     (!StrUtil.isNullOrEmpty(uecArticle.getWhichauthor())?uecArticle.getWhichauthor():"")+"\r\n";
						}
					}
				}else {
					uecArticleString="无";
				}
				//创新结果
				uecInnovationByPkPsndoc = uecInnovationManager.findUecInnovationByPkPsndoc(staffAndOutStaff);		
				String uecInnovationString="";
				if(uecInnovationByPkPsndoc != null && uecInnovationByPkPsndoc.size()>0) {
					for(UecInnovation uecInnovation:uecInnovationByPkPsndoc) {
						if(!"无".equals(uecInnovation.getInnovationName())) {
							uecInnovationString=uecInnovationString+(!StrUtil.isNullOrEmpty(uecInnovation.getInnovationName())?uecInnovation.getInnovationName():"")+"    "+
							StrTraslate(uecInnovation.getGettime())+"    "+
							(!StrUtil.isNullOrEmpty(uecInnovation.getEvaluateName())?uecInnovation.getEvaluateName():"")+"/"+
							(!StrUtil.isNullOrEmpty(uecInnovation.getAwardsName())?uecInnovation.getAwardsName():"")+"/"+
							(!StrUtil.isNullOrEmpty(uecInnovation.getGradeName())?uecInnovation.getGradeName():"")+"    "+
							uecInnovation.getJointype()+"    "+uecInnovation.getDocumentName()+"/"+uecInnovation.getDocumentNum()+"    "+
							(!StrUtil.isNullOrEmpty(uecInnovation.getRemark())?uecInnovation.getRemark():"")+"\r\n";
						}
					}
				}else {
					uecInnovationString="无";
				}
				
				// 考核信息
				String result16="";
				String result17="";
				String result18="";
				if (findUecAssByStaffId != null && findUecAssByStaffId.size() > 0) {
					for (UecAss uecass : findUecAssByStaffId) {
						if (null != uecass.getGlbdef4()) {
							if (uecass.getGlbdef4().contains("16")) {
								result16=uecass.getPkPerankName();
							} 
						  if (uecass.getGlbdef4().contains("17")) {
							  result17=uecass.getPkPerankName();
						    } 
						  if (uecass.getGlbdef4().contains("18")) {
							  result18=uecass.getPkPerankName();
						   } 
						}
					}	
				}
				result16=StrUtil.isNullOrEmpty(result16)?"—":result16;
				result17=StrUtil.isNullOrEmpty(result17)?"—":result17;
				result18=StrUtil.isNullOrEmpty(result18)?"—":result18;
		//更新人员履历和奖励信息
		boolean flag = getLogDown(logDown);//判断数据库里是否已经存在，以免初次登录重新添加
		logDown.setUecnationdutylist(uecNationdutyString);
		logDown.setUectalentteamlist(uecTalentTeamString);
		logDown.setUecworklist(uecworkString);
		logDown.setUecenclist(uecEncString);
		logDown.setUecarticlelist(uecArticleString);
		logDown.setUecimportantworkjlist(uecImportantJString);
		logDown.setUecimportantworklist(uecImportantString);
		logDown.setUecinnovationlist(uecInnovationString);
		logDown.setAss2016(result16);
		logDown.setAss2017(result17);
		logDown.setAss2018(result18);
		logDown.setWorkorgdept(uecStaffAll.getOrgname()+"/"+uecStaffAll.getDeptname());
		logDown.setWorkpostgrade(uecStaffAll.getPostname()+"/"+uecStaffAll.getJobglbdef3());
		
		logDown.setAllstudy(allstudy);
		logDown.setZaistudy(zaistudy);
		logDown.setChildtalentname(childTalent);
		logDown.setTalentname(joinCategory);
		logDown.setTitleinfo(uecTitleString);
		logDown.updateOnly();
		/**
		 * pdf创建
		 */
		Document document = new Document();// 1.新建document对象
		// 2.建立一个书写器(Writer)与document对象关联，通过书写器(Writer)可以将文档写入到磁盘中。
		// 创建 PdfWriter 对象 第一个参数是对文档对象的引用，第二个参数是文件的实际名称，在该名称中还会给出其输出路径。
		ByteArrayOutputStream os = new ByteArrayOutputStream();
		PdfWriter writer = PdfWriter.getInstance(document, os);
		// 设置只读权限(加密)
		// writer.setEncryption(null,null, PdfWriter.ALLOW_PRINTING,
		// PdfWriter.ENCRYPTION_AES_128);
		writer.setViewerPreferences(PdfWriter.PageModeUseThumbs);
		writer.setUserProperties(true);
		document.setPageSize(PageSize.A4);// 设置纸张大小
		// 3.打开文档
		document.open();
		// 中文字体,解决中文不能显示问题
		BaseFont bfChinese = BaseFont.createFont("STSong-Light",
				"UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
		Font blueFont = new Font(bfChinese,10,Font.NORMAL);//内容
		Font blueFont2 = new Font(bfChinese,10,Font.BOLD);//字段
		 Font blueFont1 = new Font(bfChinese, 16, Font.BOLD);//标题
		 Font blueFont3 = new Font(bfChinese, 10, Font.BOLD);//加*号字体为蓝色
		// blueFont3.setFamily(family);
		 blueFont3.setColor(BaseColor.BLUE);
		// 创建表格

		// 3列的表.
		// document.add(new
		// Paragraph("2018年中国电信内蒙古分公司面向派遣及业务外包公司人员招录员工报名表",blueFont));
		PdfPTable table = new PdfPTable(8);
		table.setWidthPercentage(100); // 宽度100%填充
		// table.setSpacingBefore(10f); // 前间距
		// table.setSpacingAfter(10f); // 后间距
		List<PdfPRow> listRow = table.getRows();
		// 设置列宽
		float[] columnWidths = { 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f};
		table.setWidths(columnWidths);

		// 行1
		PdfPCell cells3[] = new PdfPCell[8];
		PdfPRow row1 = new PdfPRow(cells3);
		cells3[0] = new PdfPCell(new Paragraph(
				"内蒙古电信公司专家推荐表", blueFont1));// 单元格内容
		cells3[0].setColspan(8);
		cells3[0].disableBorderSide(3);
		cells3[0].disableBorderSide(12);
		//cells3[0].disableBorderSide(4);
		//cells3[0].disableBorderSide(8);
		cells3[0].setPaddingBottom(25);
		cells3[0].setHorizontalAlignment(Element.ALIGN_CENTER);
		cells3[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		
		// 行2
				PdfPCell cells2000[] = new PdfPCell[8];
				PdfPRow row2000 = new PdfPRow(cells2000);
				cells2000[0] = new PdfPCell(new Paragraph("报送单位:", blueFont));// 单元格内容
				cells2000[0].disableBorderSide(3);
				//cells200[0].disableBorderSide(4);
				//cells200[0].disableBorderSide(8);
				cells2000[0].disableBorderSide(12);
				cells2000[0].setHorizontalAlignment(Element.ALIGN_LEFT);
				cells2000[1] = new PdfPCell(new Paragraph(uecStaffAll.getOrgname(), blueFont));// 单元格内容
				cells2000[1].disableBorderSide(3);
				cells2000[1].disableBorderSide(12);
				cells2000[1].setColspan(7);
				cells2000[1].setHorizontalAlignment(Element.ALIGN_LEFT);// 水平居左
				cells2000[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells2000[1].disableBorderSide(3);
				cells2000[1].disableBorderSide(12);
				
		
		
		
		// 行2
		PdfPCell cells200[] = new PdfPCell[8];
		PdfPRow row2 = new PdfPRow(cells200);
		cells200[0] = new PdfPCell(new Paragraph("申报类型:", blueFont));// 单元格内容
		cells200[0].disableBorderSide(3);
		cells200[0].disableBorderSide(12);
		cells200[0].setHorizontalAlignment(Element.ALIGN_LEFT);
		cells200[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells200[1] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(logDown.getTalentType())?logDown.getTalentType():""), blueFont));// 单元格内容
		cells200[1].disableBorderSide(3);
		cells200[1].disableBorderSide(12);
		cells200[1].setHorizontalAlignment(Element.ALIGN_LEFT);
		cells200[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells200[2] = new PdfPCell(new Paragraph("专家等级：",
				blueFont));
		cells200[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells200[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells200[2].disableBorderSide(3);
		cells200[2].disableBorderSide(12);
		cells200[3] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(logDown.getTalentgrade())?logDown.getTalentgrade():""), blueFont));// 单元格内容
		cells200[3].disableBorderSide(3);
		cells200[3].disableBorderSide(12);
		cells200[3].setHorizontalAlignment(Element.ALIGN_LEFT);
		cells200[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells200[4] = new PdfPCell(new Paragraph("申报专业：",
				blueFont));
		cells200[4].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells200[4].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells200[4].disableBorderSide(3);
		cells200[4].disableBorderSide(12);
		cells200[5] = new PdfPCell(new Paragraph(joinCategory, blueFont));// 单元格内容
		cells200[5].disableBorderSide(3);
		cells200[5].disableBorderSide(12);
		cells200[5].setHorizontalAlignment(Element.ALIGN_LEFT);
		cells200[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		//cells200[4].disableBorderSide(4);
		//cells200[4].disableBorderSide(8);
		cells200[6]= new PdfPCell(new Paragraph("子专业：", blueFont));// 单元格内容
		cells200[6].disableBorderSide(3);
		cells200[6].disableBorderSide(12);
		cells200[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells200[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		//cells200[5].disableBorderSide(8);
		cells200[7]= new PdfPCell(new Paragraph(childTalent, blueFont));
		cells200[7].disableBorderSide(3);
		cells200[7].disableBorderSide(12);
		cells200[7].setHorizontalAlignment(Element.ALIGN_LEFT);
		cells200[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		//cells200[6].disableBorderSide(4);
		//cells200[6].disableBorderSide(8);
		//cells200[6].setColspan(2);
		// 行3
		PdfPCell cells1[] = new PdfPCell[8];
		PdfPRow row3 = new PdfPRow(cells1);
		// 单元格
		cells1[0] = new PdfPCell(new Paragraph("姓名\r\n", blueFont2));// 单元格内容
		cells1[0].setPaddingBottom(8);
		cells1[0].setPaddingTop(8);
		cells1[2] = new PdfPCell(new Paragraph("性      别", blueFont2));// 单元格内容
		cells1[4] = new PdfPCell(new Paragraph("出生年月", blueFont2));// 单元格内容
		cells1[6] = new PdfPCell(new Paragraph("政治面貌", blueFont2));// 单元格内容
		cells1[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells1[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中

		cells1[1] = new PdfPCell(new Paragraph(
          uecStaffAll.getName(), blueFont));
		cells1[3] = new PdfPCell(new Paragraph(
				uecStaffAll.getSex(), blueFont));
		cells1[5] = new PdfPCell(new Paragraph(
				uecStaffAll.getBIRTHDATE(), blueFont));
		cells1[7] = new PdfPCell(new Paragraph(
				uecStaffAll.getPartyname(), blueFont));
		cells1[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells1[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells1[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells1[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells1[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells1[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells1[4].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells1[4].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells1[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells1[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells1[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells1[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells1[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells1[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		
		// 行4
		PdfPCell cells4[] = new PdfPCell[8];
		PdfPRow row4 = new PdfPRow(cells4);
		cells4[0] = new PdfPCell(new Paragraph("工作单位及\r\n"+"部门", blueFont2));
		cells4[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells4[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells4[0].setPaddingBottom(8);
		cells4[0].setPaddingTop(8);
		cells4[1] = new PdfPCell(new Paragraph(uecStaffAll.getOrgname()+"  "+uecStaffAll.getDeptname(), blueFont));
		cells4[1].setColspan(3);
		cells4[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells4[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells4[4] = new PdfPCell(new Paragraph("岗位及\r\n"+"岗级", blueFont2));
		cells4[4].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells4[4].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells4[4].setPaddingBottom(8);
		cells4[4].setPaddingTop(8);
		cells4[5] = new PdfPCell(new Paragraph(uecStaffAll.getPostname()+"     "+uecStaffAll.getJobglbdef3(), blueFont));
		cells4[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells4[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells4[5].setColspan(3);
		
		// 行5
		PdfPCell cells5[] = new PdfPCell[8];
		PdfPRow row5 = new PdfPRow(cells5);
		cells5[0] = new PdfPCell(new Paragraph("从事"+joinCategory+"\r\n"+"工作起始时间", blueFont2));
		cells5[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells5[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells5[0].setPaddingBottom(8);
		cells5[0].setPaddingTop(8);
		cells5[1] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(logDown.getBegindatetanlent())?StrTraslate(logDown.getBegindatetanlent()):"")
				, blueFont));
		cells5[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells5[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells5[1].setColspan(2);
		cells5[3] = new PdfPCell(new Paragraph("从事本子专业\r\n"+"工作起始日期", blueFont2));
		cells5[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells5[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells5[3].setPaddingBottom(8);
		cells5[3].setPaddingTop(8);
		cells5[4] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(logDown.getBegindatechild())?StrTraslate(logDown.getBegindatechild()):""), blueFont));
		cells5[4].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells5[4].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells5[4].setColspan(2);
		
		cells5[6] = new PdfPCell(new Paragraph("参加工作时间", blueFont2));
		cells5[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells5[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells5[6].setPaddingBottom(8);
		cells5[6].setPaddingTop(8);
		cells5[7] = new PdfPCell(new Paragraph(dataTemp, blueFont));
		cells5[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells5[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		
		// 行6
		PdfPCell cells7[] = new PdfPCell[8];
		PdfPRow row6 = new PdfPRow(cells7);
		cells7[0] = new PdfPCell(new Paragraph("专业资格证书\r\n" + 
				"及获得年月\r\n" + 
				"", blueFont2));
		cells7[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells7[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells7[0].setPaddingBottom(8);
		cells7[0].setPaddingTop(8);
		cells7[1] = new PdfPCell(new Paragraph(uecNationdutyString, blueFont));
		cells7[1].setColspan(5);
		cells7[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells7[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells7[6] = new PdfPCell(new Paragraph("进入电信时间" + 
				"", blueFont2));
		cells7[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells7[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells7[7] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecStaffAll.getEnterunittime())?StrTraslateFormat(uecStaffAll.getEnterunittime()):""), blueFont));
		cells7[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells7[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		
		
		
		
		//专业技术职称
		PdfPCell cells51[] = new PdfPCell[8];
		PdfPRow row51 = new PdfPRow(cells51);
		cells51[0] = new PdfPCell(new Paragraph("专业技术职称", blueFont2));
		cells51[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells51[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells51[0].setPaddingBottom(8);
		cells51[0].setPaddingTop(8);
		cells51[1] = new PdfPCell(new Paragraph(uecTitleString, blueFont));
		cells51[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells51[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells51[1].setColspan(7);
		//是否曾聘任本专业BCD级人才，聘期及年度考核结果
		PdfPCell cells50[] = new PdfPCell[8];
		PdfPRow row50 = new PdfPRow(cells50);
		
		cells50[0] = new PdfPCell(new Paragraph("", blueFont));
		cells7[1].setColspan(5);
		cells7[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells7[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells50[0] = new PdfPCell(new Paragraph("是否曾聘任本\r\n" + 
				"专业BCD级人\r\n" + 
				"才，聘期及年\r\n" + 
				"度考核结果\r\n" + 
				"", blueFont2));
		cells50[0].setPaddingBottom(8);
		cells50[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells50[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells50[1] = new PdfPCell(new Paragraph(uecTalentTeamString, blueFont));
		cells50[1].setColspan(7);
		cells50[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells50[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		
		
		// 行7
		PdfPCell cells6[] = new PdfPCell[8];
		PdfPRow row7 = new PdfPRow(cells6);
		cells6[0] = new PdfPCell(new Paragraph("联系电话", blueFont2));
		cells6[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells6[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells6[0].setPaddingBottom(8);
		cells6[0].setPaddingTop(8);
		cells6[1] = new PdfPCell(new Paragraph((StrUtil.isNullOrEmpty(uecStaffAll.getMobile())?" —— ":uecStaffAll.getMobile())
				, blueFont));
		cells6[1].setColspan(2);
		cells6[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells6[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells6[3] = new PdfPCell(new Paragraph("电子邮箱", blueFont2));
		cells6[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells6[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells6[4] = new PdfPCell(new Paragraph((StrUtil.isNullOrEmpty(uecStaffAll.getEmail())?" —— ":uecStaffAll.getEmail())
				, blueFont));
		cells6[4].setColspan(2);
		cells6[4].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells6[4].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中

		cells6[6] = new PdfPCell(new Paragraph("是否曾聘组监" + 
				"", blueFont2));
		cells6[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells6[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells6[7] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(logDown.getIssupervisor())?logDown.getIssupervisor():""), blueFont));
		cells6[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells6[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		//行8
		PdfPCell cells8[] = new PdfPCell[8];
		PdfPRow row8 = new PdfPRow(cells8);
		cells8[0] =new PdfPCell(new Paragraph("人才标签\r\n", blueFont2));
		cells8[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells8[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells8[0].setPaddingBottom(8);
		cells8[0].setPaddingTop(8);
		cells8[1] =new PdfPCell(new Paragraph("产品类：  " + 
				(!StrUtil.isNullOrEmpty(logDown.getTalentChanPin())?logDown.getTalentChanPin():"无")+"\r\n"+" "+"\r\n"+ 
				"行业类：  " + 
				(!StrUtil.isNullOrEmpty(logDown.getTalentHangYe())?logDown.getTalentHangYe():"无")+"\r\n"+" "+"\r\n"
				, blueFont));
		cells8[1].setColspan(7);
		cells8[1].setPaddingBottom(8);
		cells8[1].setPaddingTop(8);
		// 工作履历
				PdfPCell cells14[] = new PdfPCell[8];
				PdfPRow row9 = new PdfPRow(cells14);
				cells14[0] = new PdfPCell(new Paragraph("工\r\n" + 
						"作\r\n" + 
						"简\r\n" + 
						"历\r\n" + 
						"", blueFont2));
				cells14[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells14[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				if(queryPageInfoByUecStaffId.size()<=3) {
					cells14[0].setRowspan(4);
				}else {
					cells14[0].setRowspan(1+queryPageInfoByUecStaffId.size());
				}
				
				cells14[1] = new PdfPCell(new Paragraph("起止年月", blueFont2));
				cells14[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells14[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells14[1].setColspan(2);
				cells14[1].setPaddingTop(8);
				cells14[1].setPaddingBottom(8);
				cells14[3] = new PdfPCell(new Paragraph("工作单位", blueFont2));
				cells14[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells14[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells14[3].setColspan(2);
				cells14[5] = new PdfPCell(new Paragraph("部门", blueFont2));
				cells14[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells14[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells14[5].setColspan(2);
				cells14[7] = new PdfPCell(new Paragraph("岗位", blueFont2));
				cells14[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells14[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				listRow.add(row1);
				listRow.add(row2000);
				listRow.add(row2);
				listRow.add(row3);
				listRow.add(row4);
				listRow.add(row5);
				listRow.add(row6);
				listRow.add(row50);
				listRow.add(row51);
				listRow.add(row7);
				listRow.add(row8);
				listRow.add(row9);
				if(queryPageInfoByUecStaffId.size()<=0) {
					PdfPCell cells22[] = new PdfPCell[8];
					PdfPRow row99 = new PdfPRow(cells22);
					cells22[0] = new PdfPCell(new Paragraph(" ", blueFont));
					cells22[0].disableBorderSide(1);
					cells22[0].disableBorderSide(2);
					cells22[1] = new PdfPCell(new Paragraph("—", blueFont));
					cells22[1].setPaddingTop(8);
					cells22[1].setPaddingBottom(8);
					cells22[1].setColspan(2);
					cells22[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells22[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells22[3] = new PdfPCell(new Paragraph("—", blueFont));
					cells22[3].setColspan(2);
					cells22[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells22[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells22[5] = new PdfPCell(new Paragraph("—",blueFont));
					cells22[5].setColspan(2);
					cells22[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells22[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells22[7] = new PdfPCell(new Paragraph("—",blueFont));
					cells22[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells22[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					listRow.add(row99);
					listRow.add(row99);
					listRow.add(row99);
				}else {
					if(queryPageInfoByUecStaffId.size()<3) {
			            for (int i = 0; i < queryPageInfoByUecStaffId.size(); i++) {
							UecWork uecwork = queryPageInfoByUecStaffId.get(i);
							if (uecwork != null) {
								PdfPCell cells[] = new PdfPCell[8];
								PdfPRow row = new PdfPRow(cells);
								cells[0] = new PdfPCell(new Paragraph("", blueFont));
								cells[0].disableBorderSide(1);
								cells[0].disableBorderSide(2);
								cells[1] = new PdfPCell(new Paragraph(uecwork.getDataCollection(), blueFont));
								cells[1].setPaddingTop(8);
								cells[1].setPaddingBottom(8);
								cells[1].setColspan(2);
								cells[3] = new PdfPCell(new Paragraph((StrUtil.isNullOrEmpty(uecwork.getWorkcorp())?" —— ":uecwork.getWorkcorp())
									, blueFont));
								cells[3].setColspan(2);
								cells[5] = new PdfPCell(new Paragraph((StrUtil.isNullOrEmpty(uecwork.getWorkdept())?" —— ":uecwork.getWorkdept())
										, blueFont));
								cells[5].setColspan(2);
								cells[7] = new PdfPCell(new Paragraph((StrUtil.isNullOrEmpty(uecwork.getWorkpost())?" —— ":uecwork.getWorkpost()),
										blueFont));
								cells[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
								cells[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
								cells[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
								cells[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
								//cells[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
								//cells[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
								cells[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
								cells[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
								listRow.add(row);
							}
						 }
			            PdfPCell cells22[] = new PdfPCell[8];
						PdfPRow row22 = new PdfPRow(cells22);
						cells22[0] = new PdfPCell(new Paragraph(" ", blueFont));
						cells22[0].disableBorderSide(1);
						cells22[0].disableBorderSide(2);
						cells22[1] = new PdfPCell(new Paragraph("—", blueFont));
						cells22[1].setPaddingTop(8);
						cells22[1].setPaddingBottom(8);
						cells22[1].setColspan(2);
						cells22[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells22[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells22[3] = new PdfPCell(new Paragraph("—", blueFont));
						cells22[3].setColspan(2);
						cells22[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells22[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells22[5] = new PdfPCell(new Paragraph("—",blueFont));
						cells22[5].setColspan(2);
						cells22[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells22[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells22[7] = new PdfPCell(new Paragraph("—",blueFont));
						cells22[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells22[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						for(int i=0;i<3-queryPageInfoByUecStaffId.size();i++) {
							listRow.add(row22);
						}
						
					}else {
						for (int i = 0; i < queryPageInfoByUecStaffId.size(); i++) {
				            
							UecWork uecwork = queryPageInfoByUecStaffId.get(i);
							if (uecwork != null) {
								PdfPCell cells[] = new PdfPCell[8];
								PdfPRow row = new PdfPRow(cells);
								cells[0] = new PdfPCell(new Paragraph("", blueFont));
								cells[0].disableBorderSide(1);
								cells[0].disableBorderSide(2);
								cells[1] = new PdfPCell(new Paragraph(uecwork.getDataCollection(), blueFont));
								cells[1].setPaddingTop(8);
								cells[1].setPaddingBottom(8);
								cells[1].setColspan(2);
								cells[3] = new PdfPCell(new Paragraph((StrUtil.isNullOrEmpty(uecwork.getWorkcorp())?" —— ":uecwork.getWorkcorp())
										, blueFont));
								cells[3].setColspan(2);
								cells[5] = new PdfPCell(new Paragraph((StrUtil.isNullOrEmpty(uecwork.getWorkdept())?" — ":uecwork.getWorkdept())
										, blueFont));
								cells[5].setColspan(2);
								cells[7] = new PdfPCell(new Paragraph((StrUtil.isNullOrEmpty(uecwork.getWorkpost())?" — ":uecwork.getWorkpost()),
										blueFont));
								cells[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
								cells[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
								cells[3].setHorizontalAlignment(Element.ALIGN_LEFT);// 水平居中
								cells[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
								cells[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
								cells[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
								cells[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
								cells[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
								listRow.add(row);
							}
						 }
					}
				
				}
		
		//教育经历		
		PdfPCell cells100[] = new PdfPCell[8];
		PdfPRow row100 = new PdfPRow(cells100);
		cells100[0] = new PdfPCell(new Paragraph("教育经历", blueFont2));	
		cells100[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells100[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells100[0].setPaddingTop(8);
		cells100[0].setPaddingBottom(8);
		cells100[0].setRowspan(2);
		cells100[0].disableBorderSide(3);
		cells100[1] = new PdfPCell(new Paragraph("全日制教育", blueFont2));
		cells100[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells100[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中		
		cells100[1].setPaddingTop(8);
		cells100[1].setPaddingBottom(8);
		cells100[2] = new PdfPCell(new Paragraph(allstudy, blueFont));
		cells100[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells100[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中		
		cells100[2].setPaddingTop(8);
		cells100[2].setPaddingBottom(8);
		cells100[2].setColspan(6);
		
		PdfPCell cells101[] = new PdfPCell[8];
		PdfPRow row101 = new PdfPRow(cells101);
		cells101[0] = new PdfPCell(new Paragraph("", blueFont2));	
		cells101[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells101[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells101[0].setPaddingTop(8);
		cells101[0].setPaddingBottom(8);
		cells101[0].disableBorderSide(3);
		cells101[1] = new PdfPCell(new Paragraph("在职教育", blueFont2));
		cells101[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells101[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中		
		cells101[1].setPaddingTop(8);
		cells101[1].setPaddingBottom(8);
		cells101[2] = new PdfPCell(new Paragraph(zaistudy, blueFont));
		cells101[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells101[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中		
		cells101[2].setPaddingTop(8);
		cells101[2].setPaddingBottom(8);
		cells101[2].setColspan(6);
		listRow.add(row100);
		listRow.add(row101);
		PdfPCell cells10[] = new PdfPCell[8];
		PdfPRow row10 = new PdfPRow(cells10);
		cells10[0] = new PdfPCell(new Paragraph("近三年度个人绩效考核结果", blueFont2));
		cells10[0].setPaddingTop(8);
		cells10[0].setPaddingBottom(8);
		//cells10[0].disableBorderSide(3);
		cells10[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells10[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells10[0].setRowspan(2);
		cells10[1]=new PdfPCell(new Paragraph("2016年度", blueFont2));
		cells10[1].setPaddingTop(8);
		cells10[1].setPaddingBottom(8);
		cells10[1].setColspan(2);
		cells10[3]=new PdfPCell(new Paragraph("2017年度", blueFont2));
		cells10[3].setPaddingTop(8);
		cells10[3].setPaddingBottom(8);
		cells10[3].setColspan(2);
		cells10[5]=new PdfPCell(new Paragraph("2018年度", blueFont2));
		cells10[5].setPaddingTop(8);
		cells10[5].setPaddingBottom(8);
		cells10[5].setColspan(3);
		cells10[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells10[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells10[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells10[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells10[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells10[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中


		PdfPCell cells1001[] = new PdfPCell[8];
		PdfPRow row1001 = new PdfPRow(cells1001);
		cells1001[0] = new PdfPCell(new Paragraph("", blueFont));
		cells1001[0].setPaddingTop(8);
		cells1001[0].setPaddingBottom(8);
		cells1001[0].disableBorderSide(3);
		cells1001[1]=new PdfPCell(new Paragraph(result16, blueFont));
		cells1001[1].setPaddingTop(8);
		cells1001[1].setPaddingBottom(8);
		cells1001[1].setColspan(2);
		cells1001[3]=new PdfPCell(new Paragraph(result17, blueFont));
		cells1001[3].setPaddingTop(8);
		cells1001[3].setPaddingBottom(8);
		cells1001[3].setColspan(2);
		cells1001[5]=new PdfPCell(new Paragraph(result18, blueFont));
		cells1001[5].setPaddingTop(8);
		cells1001[5].setPaddingBottom(8);
		cells1001[5].setColspan(3);
		cells1001[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells1001[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells1001[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells1001[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells1001[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells1001[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		
		/*
		cells10[2]=new PdfPCell(new Paragraph(result16, blueFont));
		cells10[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells10[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		PdfPCell cells11[] = new PdfPCell[8];
		PdfPRow row11 = new PdfPRow(cells11);
		cells11[0] = new PdfPCell(new Paragraph("", blueFont2));
		cells11[0].setPaddingTop(8);
		cells11[0].setPaddingBottom(8);
		cells11[0].disableBorderSide(3);
		cells11[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells11[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells11[1]=new PdfPCell(new Paragraph("2017年度", blueFont2));
		cells11[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells11[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells11[1].setPaddingTop(8);
		cells11[1].setPaddingBottom(8);
		cells11[2]=new PdfPCell(new Paragraph(result17, blueFont));
		cells11[2].setColspan(6);
		cells11[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells11[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		PdfPCell cells12[] = new PdfPCell[8];
		PdfPRow row12 = new PdfPRow(cells12);
		cells12[0] = new PdfPCell(new Paragraph("", blueFont2));
		cells12[0].setPaddingTop(8);
		cells12[0].setPaddingBottom(8);
		cells12[0].disableBorderSide(3);
		cells12[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells12[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells12[1]=new PdfPCell(new Paragraph("2018年度", blueFont2));
		cells12[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells12[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells12[1].setPaddingTop(8);
		cells12[1].setPaddingBottom(8);
		cells12[2]=new PdfPCell(new Paragraph(result18, blueFont));
		cells12[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells12[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells12[2].setColspan(6);*/
		listRow.add(row10);
		listRow.add(row1001);
		//listRow.add(row12);
		
		
		// 获得荣誉情况
		PdfPCell cells13[] = new PdfPCell[8];
		PdfPRow row13 = new PdfPRow(cells13);
		cells13[0] = new PdfPCell(new Paragraph("近三年获奖\r\n"+"情况", blueFont2));
		cells13[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells13[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		if(findUecEncByOutStaffId.size()<=3) {
			cells13[0].setRowspan(4);
		}else {
			cells13[0].setRowspan(findUecEncByOutStaffId.size()+1);
		}
		cells13[1] = new PdfPCell(new Paragraph("授予年月", blueFont2));
		cells13[1].setColspan(2);
		cells13[1].setPaddingTop(8);
		cells13[1].setPaddingBottom(8);
		cells13[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells13[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells13[3] = new PdfPCell(new Paragraph("荣誉称号", blueFont2));
		cells13[3].setColspan(2);
		cells13[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells13[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells13[5] = new PdfPCell(new Paragraph("授予单位", blueFont2));
		cells13[5].setColspan(2);
		cells13[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells13[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells13[7] = new PdfPCell(new Paragraph("等级", blueFont2));
		cells13[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells13[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		listRow.add(row13);
		if(findUecEncByOutStaffId.size()<=0) {
			PdfPCell cells210[] = new PdfPCell[8];
			PdfPRow row210 = new PdfPRow(cells210);
			cells210[0] = new PdfPCell(new Paragraph("", blueFont));
			cells210[0].disableBorderSide(3);
			cells210[1] = new PdfPCell(new Paragraph("—",blueFont));
			cells210[1].setColspan(2);
			cells210[1].setPaddingTop(8);
			cells210[1].setPaddingBottom(8);
			cells210[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
			cells210[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
			cells210[3] = new PdfPCell(new Paragraph("—",blueFont));
			cells210[3].setColspan(2);
			cells210[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
			cells210[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
			cells210[5] = new PdfPCell(new Paragraph("—",blueFont));
			cells210[5].setColspan(2);
			cells210[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
			cells210[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
			cells210[7] = new PdfPCell(new Paragraph("—",blueFont));
			cells210[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
			cells210[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
			listRow.add(row210);
			listRow.add(row210);
			listRow.add(row210);
		}else {
			if(findUecEncByOutStaffId.size()<=3) {
				for (int i = 0; i < findUecEncByOutStaffId.size(); i++) {
					UecEnc uecenc = findUecEncByOutStaffId.get(i);
					if (uecenc != null) {
						PdfPCell cells20[] = new PdfPCell[8];
						PdfPRow row20 = new PdfPRow(cells20);
						cells20[0] = new PdfPCell(new Paragraph("", blueFont));
						cells20[0].disableBorderSide(1);
						cells20[0].disableBorderSide(2);
						cells20[1] = new PdfPCell(new Paragraph(uecenc.getDataCollection(),
								blueFont));
						cells20[1].setColspan(2);
						cells20[1].setPaddingTop(8);
						cells20[1].setPaddingBottom(8);
						cells20[3] = new PdfPCell(new Paragraph(uecenc.getGlbdef1(),
								blueFont));
						cells20[3].setColspan(2);
						cells20[5] = new PdfPCell(new Paragraph(uecenc.getEncourorg(),
								blueFont));
						cells20[5].setColspan(2);
						cells20[7] = new PdfPCell(new Paragraph(uecenc.getEncourrankName(),blueFont));
						cells20[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells20[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells20[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells20[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells20[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells20[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells20[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells20[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						listRow.add(row20);
					}
				}
				for(int j=0;j<3-findUecEncByOutStaffId.size();j++) {
					PdfPCell cells21[] = new PdfPCell[8];
					PdfPRow row21 = new PdfPRow(cells21);
					cells21[0] = new PdfPCell(new Paragraph("", blueFont));
					cells21[0].disableBorderSide(1);
					cells21[0].disableBorderSide(2);
					cells21[1] = new PdfPCell(new Paragraph("—",blueFont));
					cells21[1].setColspan(2);
					cells21[1].setPaddingTop(8);
					cells21[1].setPaddingBottom(8);
					cells21[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells21[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells21[3] = new PdfPCell(new Paragraph("—",blueFont));
					cells21[3].setColspan(2);
					cells21[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells21[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells21[5] = new PdfPCell(new Paragraph("—",blueFont));
					cells21[5].setColspan(2);
					cells21[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells21[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells21[7] = new PdfPCell(new Paragraph("—",blueFont));
					cells21[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells21[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					listRow.add(row21);
					
				}
			}else {
			for (int i = 0; i < findUecEncByOutStaffId.size(); i++) {
				UecEnc uecenc = findUecEncByOutStaffId.get(i);
				if (uecenc != null) {
					PdfPCell cells20[] = new PdfPCell[8];
					PdfPRow row20 = new PdfPRow(cells20);
					cells20[0] = new PdfPCell(new Paragraph("", blueFont));
					cells20[0].disableBorderSide(1);
					cells20[0].disableBorderSide(2);
					cells20[1] = new PdfPCell(new Paragraph(uecenc.getDataCollection(),
							blueFont));
					cells20[1].setColspan(2);
					cells20[1].setPaddingTop(8);
					cells20[1].setPaddingBottom(8);
					cells20[3] = new PdfPCell(new Paragraph(uecenc.getGlbdef1(),
							blueFont));
					cells20[3].setColspan(2);
					cells20[5] = new PdfPCell(new Paragraph(uecenc.getEncourorg(),
							blueFont));
					cells20[5].setColspan(2);
					cells20[7] = new PdfPCell(new Paragraph(uecenc.getEncourrankName(),blueFont));
					cells20[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells20[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells20[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells20[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells20[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells20[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells20[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells20[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					listRow.add(row20);
				}
			}
			}
		}
		   // 近三年发表论文、专著等情况

				PdfPCell cells25[] = new PdfPCell[8];
				PdfPRow row25 = new PdfPRow(cells25);
				cells25[0] = new PdfPCell(new Paragraph("近三年发表\r\n" + 
						"论文、专著\r\n" + 
						"等情况\r\n" + 
						"", blueFont2));
				cells25[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells25[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				//cells25[0].disableBorderSide(3);
				cells25[1] = new PdfPCell(new Paragraph("发表论文年度", blueFont2));
				cells25[1].setPaddingTop(8);
				cells25[1].setPaddingBottom(8);
				cells25[1].setColspan(2);
				cells25[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells25[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells25[3] = new PdfPCell(new Paragraph("刊物名称", blueFont2));
				cells25[3].setColspan(2);
				cells25[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells25[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells25[5] = new PdfPCell(new Paragraph("论文名称", blueFont2));
				cells25[5].setColspan(2);
				cells25[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells25[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells25[7] = new PdfPCell(new Paragraph("第几作者", blueFont2));
				cells25[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells25[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				
				boolean contains=true;//判断是否包含无
				if(uecArticleByPkPsndoc.size()>0) {
					for(UecArticle uecArticle:uecArticleByPkPsndoc) {
						if("无".equals(uecArticle.getArticleName())) {
							contains=false;
							break;
						}
					}
				}
				if(contains && uecArticleByPkPsndoc.size()>=5) {
					cells25[0].setRowspan(uecArticleByPkPsndoc.size()+1);
				}else if(contains && uecArticleByPkPsndoc.size()<5 && uecArticleByPkPsndoc.size()>0) {
					cells25[0].setRowspan(6);
				}else {
					cells25[0].setRowspan(6);
				}
				listRow.add(row25);
				
				if(contains) {
				if(uecArticleByPkPsndoc.size()<=0) {
					for(int i=0;i<5;i++) {
						PdfPCell cells26[] = new PdfPCell[8];
						PdfPRow row26 = new PdfPRow(cells26);
						cells26[0] = new PdfPCell(new Paragraph("", blueFont));
						cells26[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[0].disableBorderSide(3);
						cells26[1] = new PdfPCell(new Paragraph(" ", blueFont));
						cells26[1].setPaddingTop(8);
						cells26[1].setPaddingBottom(8);
						cells26[1].setColspan(2);
						cells26[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[3] = new PdfPCell(new Paragraph("", blueFont));
						cells26[3].setColspan(2);
						cells26[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[5] = new PdfPCell(new Paragraph("", blueFont));
						cells26[5].setColspan(2);
						cells26[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[7] = new PdfPCell(new Paragraph("", blueFont));
						cells26[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						listRow.add(row26);
					}
				}else if(uecArticleByPkPsndoc.size()>0 ){
					for(int i=0;i<uecArticleByPkPsndoc.size();i++) {
						PdfPCell cells26[] = new PdfPCell[8];
						PdfPRow row26 = new PdfPRow(cells26);
						UecArticle uecArticle = new UecArticle();
						uecArticle = uecArticleByPkPsndoc.get(i);
						cells26[0] = new PdfPCell(new Paragraph("", blueFont));
						cells26[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[0].disableBorderSide(3);
						cells26[1] = new PdfPCell(new Paragraph(
								(!StrUtil.isNullOrEmpty(uecArticle.getPublicationDate())?StrTraslate(uecArticle.getPublicationDate()):""), blueFont));
						cells26[1].setPaddingTop(8);
						cells26[1].setPaddingBottom(8);
						cells26[1].setColspan(2);
						cells26[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[3] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecArticle.getPublicationName())?uecArticle.getPublicationName():""),
								   blueFont));
						cells26[3].setColspan(2);
						cells26[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[5] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecArticle.getArticleName())?uecArticle.getArticleName():""), blueFont));
						cells26[5].setColspan(2);
						cells26[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[7] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecArticle.getWhichauthor())?uecArticle.getWhichauthor():""), blueFont));
						cells26[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						listRow.add(row26);
					}
					if(uecArticleByPkPsndoc.size()<5) {
						for(int i=0;i<5-uecArticleByPkPsndoc.size();i++) {
							PdfPCell cells26[] = new PdfPCell[8];
							PdfPRow row26 = new PdfPRow(cells26);
							cells26[0] = new PdfPCell(new Paragraph("", blueFont));
							cells26[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
							cells26[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
							cells26[0].disableBorderSide(3);
							cells26[1] = new PdfPCell(new Paragraph(" ", blueFont));
							cells26[1].setPaddingTop(8);
							cells26[1].setPaddingBottom(8);
							cells26[1].setColspan(2);
							//cells26[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
							//cells26[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
							cells26[3] = new PdfPCell(new Paragraph("", blueFont));
							cells26[3].setColspan(2);
							//cells26[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
							//cells26[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
							cells26[5] = new PdfPCell(new Paragraph("", blueFont));
							cells26[5].setColspan(2);
							//cells26[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
							//cells26[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
							cells26[7] = new PdfPCell(new Paragraph("", blueFont));
							//cells26[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
							//cells26[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
							listRow.add(row26);
							
						}
					}
					
				}
				/*else {
					for(int i=0;i<5;i++) {
						PdfPCell cells26[] = new PdfPCell[8];
						PdfPRow row26 = new PdfPRow(cells26);
						UecArticle uecArticle = new UecArticle();
						uecArticle = uecArticleByPkPsndoc.get(i);
						cells26[0] = new PdfPCell(new Paragraph("", blueFont));
						cells26[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[0].disableBorderSide(3);
						cells26[1] = new PdfPCell(new Paragraph(
								(!StrUtil.isNullOrEmpty(uecArticle.getPublicationDate())?StrTraslate(uecArticle.getPublicationDate()):"")
								, blueFont));
						cells26[1].setPaddingTop(8);
						cells26[1].setPaddingBottom(8);
						cells26[1].setColspan(2);
						cells26[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[3] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecArticle.getPublicationName())?uecArticle.getPublicationName():""),
								   blueFont));
						cells26[3].setColspan(2);
						cells26[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[5] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecArticle.getArticleName())?uecArticle.getArticleName():""), blueFont));
						cells26[5].setColspan(2);
						cells26[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[7] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecArticle.getWhichauthor())?uecArticle.getWhichauthor():""), blueFont));
						cells26[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						listRow.add(row26);
					}
					
					}*/
				}else {
					for(int i=0;i<5;i++) {
						PdfPCell cells26[] = new PdfPCell[8];
						PdfPRow row26 = new PdfPRow(cells26);
						cells26[0] = new PdfPCell(new Paragraph("", blueFont));
						cells26[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[0].disableBorderSide(3);
						cells26[1] = new PdfPCell(new Paragraph(" ", blueFont));
						cells26[1].setPaddingTop(8);
						cells26[1].setPaddingBottom(8);
						cells26[1].setColspan(2);
						cells26[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[3] = new PdfPCell(new Paragraph("", blueFont));
						cells26[3].setColspan(2);
						cells26[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[5] = new PdfPCell(new Paragraph("", blueFont));
						cells26[5].setColspan(2);
						cells26[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[7] = new PdfPCell(new Paragraph("", blueFont));
						cells26[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						listRow.add(row26);
					}
				}
				 // 近三年创新结果

				PdfPCell cells255[] = new PdfPCell[8];
				PdfPRow row255 = new PdfPRow(cells255);
				cells255[0] = new PdfPCell(new Paragraph("近三年创新\r\n" + 
						"结果\r\n" + 
						"", blueFont2));
				cells255[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells255[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				//cells25[0].disableBorderSide(3);
				cells255[1] = new PdfPCell(new Paragraph("项目名称", blueFont2));
				cells255[1].setPaddingTop(8);
				cells255[1].setPaddingBottom(8);
				//cells255[1].setColspan(2);
				cells255[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells255[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells255[2] = new PdfPCell(new Paragraph("获奖年份", blueFont2));
				//cells255[3].setColspan(2);
				cells255[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells255[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells255[3] = new PdfPCell(new Paragraph("评定单位\r\n" + 
						"及获奖奖\r\n" + 
						"项/等级\r\n" + 
						"", blueFont2));
				cells255[3].setColspan(2);
				cells255[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells255[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells255[5] = new PdfPCell(new Paragraph("主创/参与", blueFont2));
				cells255[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells255[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells255[6] = new PdfPCell(new Paragraph("获奖文件\r\n" + 
						"名称及文\r\n" + 
						"号\r\n" + 
						"", blueFont2));
				cells255[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells255[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells255[7] = new PdfPCell(new Paragraph("备注", blueFont2));
				cells255[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells255[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				
				boolean innovationContains=true;//判断是否包含无
				if(uecInnovationByPkPsndoc.size()>0) {
					for(UecInnovation uecInnovation:uecInnovationByPkPsndoc) {
						if("无".equals(uecInnovation.getInnovationName())) {
							innovationContains=false;
							break;
						}
					}
				}
				
				if(innovationContains && uecInnovationByPkPsndoc.size()>=3) {
					cells255[0].setRowspan(uecInnovationByPkPsndoc.size()+1);
				}else if(innovationContains && uecInnovationByPkPsndoc.size()<3 && uecInnovationByPkPsndoc.size()>0) {
					cells255[0].setRowspan(4);
				}else {
					cells255[0].setRowspan(4);
				}
				//cells255[0].setRowspan(4);
				listRow.add(row255);
				if(innovationContains) {
				if(uecInnovationByPkPsndoc.size()<=0) {
				for(int i=0;i<3;i++) {
					PdfPCell cells26[] = new PdfPCell[8];
					PdfPRow row26 = new PdfPRow(cells26);
					cells26[0] = new PdfPCell(new Paragraph("", blueFont));
					cells26[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					cells26[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells26[0].disableBorderSide(3);
					cells26[1] = new PdfPCell(new Paragraph(" ", blueFont));
					cells26[1].setPaddingTop(8);
					cells26[1].setPaddingBottom(8);
					//cells26[1].setColspan(2);
					//cells26[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					//cells26[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells26[2] = new PdfPCell(new Paragraph("", blueFont));
					//cells26[2].setColspan(2);
					//cells26[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					//cells26[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells26[3] = new PdfPCell(new Paragraph("", blueFont));
					cells26[3].setColspan(2);
					//cells26[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					//cells26[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					cells26[5] = new PdfPCell(new Paragraph("", blueFont));
					cells26[6] = new PdfPCell(new Paragraph("", blueFont));
					cells26[7] = new PdfPCell(new Paragraph("", blueFont));
					//cells26[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
					//cells26[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
					listRow.add(row26);
				}
				}else if(uecInnovationByPkPsndoc.size()>0) {
					for(int i=0;i<uecInnovationByPkPsndoc.size();i++) {
						PdfPCell cells26[] = new PdfPCell[8];
						PdfPRow row26 = new PdfPRow(cells26);
						UecInnovation uecInnovation = uecInnovationByPkPsndoc.get(i);
						cells26[0] = new PdfPCell(new Paragraph("", blueFont));
						cells26[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[0].disableBorderSide(3);
						cells26[1] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecInnovation.getInnovationName())?uecInnovation.getInnovationName():""), blueFont));
						//cells26[3].setColspan(2);
						cells26[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[2] = new PdfPCell(new Paragraph(
								(!StrUtil.isNullOrEmpty(uecInnovation.getGettime())?StrTraslate(uecInnovation.getGettime()):"")
								, blueFont));
						cells26[2].setPaddingTop(8);
						cells26[2].setPaddingBottom(8);
						//cells26[1].setColspan(2);
						cells26[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[3] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecInnovation.getEvaluateName())?uecInnovation.getEvaluateName():"")+"  "+
						(!StrUtil.isNullOrEmpty(uecInnovation.getAwardsName())?uecInnovation.getAwardsName():"")+"   "+
						(!StrUtil.isNullOrEmpty(uecInnovation.getGradeName())?uecInnovation.getGradeName():""), blueFont));
						cells26[3].setColspan(2);
						cells26[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[5] = new PdfPCell(new Paragraph(uecInnovation.getJointype(), blueFont));
						cells26[6] = new PdfPCell(new Paragraph(uecInnovation.getDocumentName()+"   "+uecInnovation.getDocumentNum(), blueFont));
						cells26[7] = new PdfPCell(new Paragraph(uecInnovation.getRemark(), blueFont));
						cells26[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						listRow.add(row26);
					}
					if(uecInnovationByPkPsndoc.size()<3) {
					for(int i=0;i<3-uecInnovationByPkPsndoc.size();i++) {
						PdfPCell cells26[] = new PdfPCell[8];
						PdfPRow row26 = new PdfPRow(cells26);
						cells26[0] = new PdfPCell(new Paragraph("", blueFont));
						cells26[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[0].disableBorderSide(3);
						cells26[1] = new PdfPCell(new Paragraph(" ", blueFont));
						cells26[1].setPaddingTop(8);
						cells26[1].setPaddingBottom(8);
						//cells26[1].setColspan(2);
						//cells26[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						//cells26[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[2] = new PdfPCell(new Paragraph("", blueFont));
						//cells26[2].setColspan(2);
						//cells26[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						//cells26[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[3] = new PdfPCell(new Paragraph("", blueFont));
						cells26[3].setColspan(2);
						//cells26[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						//cells26[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[5] = new PdfPCell(new Paragraph("", blueFont));
						cells26[6] = new PdfPCell(new Paragraph("", blueFont));
						cells26[7] = new PdfPCell(new Paragraph("", blueFont));
						//cells26[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						//cells26[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						listRow.add(row26);
					}
					}
				}
				 /* else {
					for(int i=0;i<3;i++) {
						PdfPCell cells26[] = new PdfPCell[8];
						PdfPRow row26 = new PdfPRow(cells26);
						UecInnovation uecInnovation = uecInnovationByPkPsndoc.get(i);
						cells26[0] = new PdfPCell(new Paragraph("", blueFont));
						cells26[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[0].disableBorderSide(3);
						cells26[1] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecInnovation.getInnovationName())?uecInnovation.getInnovationName():""), blueFont));
						//cells26[3].setColspan(2);
						cells26[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[2] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecInnovation.getGettime())?StrTraslate(uecInnovation.getGettime()):""), blueFont));
						cells26[2].setPaddingTop(8);
						cells26[2].setPaddingBottom(8);
						//cells26[1].setColspan(2);
						cells26[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[3] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecInnovation.getEvaluateName())?uecInnovation.getEvaluateName():"")+"  "+
								(!StrUtil.isNullOrEmpty(uecInnovation.getAwardsName())?uecInnovation.getAwardsName():"")+"   "+
								(!StrUtil.isNullOrEmpty(uecInnovation.getGradeName())?uecInnovation.getGradeName():""), blueFont));
						cells26[3].setColspan(2);
						cells26[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[5] = new PdfPCell(new Paragraph(uecInnovation.getJointype(), blueFont));
						cells26[6] = new PdfPCell(new Paragraph(uecInnovation.getDocumentName()+"   "+uecInnovation.getDocumentNum(), blueFont));
						cells26[7] = new PdfPCell(new Paragraph(uecInnovation.getRemark(), blueFont));
						cells26[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						listRow.add(row26);
					}
				}*/
				}else {
					for(int i=0;i<3;i++) {
						PdfPCell cells26[] = new PdfPCell[8];
						PdfPRow row26 = new PdfPRow(cells26);
						cells26[0] = new PdfPCell(new Paragraph("", blueFont));
						cells26[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						cells26[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[0].disableBorderSide(3);
						cells26[1] = new PdfPCell(new Paragraph(" ", blueFont));
						cells26[1].setPaddingTop(8);
						cells26[1].setPaddingBottom(8);
						//cells26[1].setColspan(2);
						//cells26[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						//cells26[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[2] = new PdfPCell(new Paragraph("", blueFont));
						//cells26[2].setColspan(2);
						//cells26[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						//cells26[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[3] = new PdfPCell(new Paragraph("", blueFont));
						cells26[3].setColspan(2);
						//cells26[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						//cells26[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						cells26[5] = new PdfPCell(new Paragraph("", blueFont));
						cells26[6] = new PdfPCell(new Paragraph("", blueFont));
						cells26[7] = new PdfPCell(new Paragraph("", blueFont));
						//cells26[7].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
						//cells26[7].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
						listRow.add(row26);
					}
				}
	    //近三年参加本单位工作情况			
		PdfPCell cells26[] = new PdfPCell[8];
		PdfPRow row26 = new PdfPRow(cells26);		
		cells26[0] = new PdfPCell(new Paragraph("近三年参加\r\n" + 
				"本单位专业\r\n" + 
				"工作情况\r\n" + 
				"（按照重要\r\n" + 
				"性填报不超\r\n" + 
				"过5项）\r\n" + 
				"", blueFont2));
		
		cells26[0].setPaddingTop(8);
		cells26[0].setPaddingBottom(8);
		cells26[0].setRowspan(6);
		cells26[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells26[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells26[1] = new PdfPCell(new Paragraph("年度", blueFont2));
		cells26[1].setPaddingTop(8);
		cells26[1].setPaddingBottom(8);
		cells26[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells26[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells26[2] = new PdfPCell(new Paragraph("项目名称", blueFont2));
		cells26[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells26[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells26[3] = new PdfPCell(new Paragraph("工作内容", blueFont2));
		cells26[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells26[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells26[3].setColspan(2);
		cells26[5] = new PdfPCell(new Paragraph("工作角色", blueFont2));
		cells26[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells26[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells26[6] = new PdfPCell(new Paragraph("项目成果", blueFont2));
		cells26[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells26[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells26[6].setColspan(2);
		listRow.add(row26);
		boolean uecImportantContains=true;//判断是否包含无
		if(uecImportantByPkPsndocb.size()>0) {
			for(UecImportantWork uecImportantWork:uecImportantByPkPsndocb) {
				if("无".equals(uecImportantWork.getWorkName())) {
					uecImportantContains=false;
					break;
				}
			}
		}
		if(uecImportantContains) {
		if(uecImportantByPkPsndocb.size()<=0) {
			for (int i = 0; i < 5; i++) {
				PdfPCell cells27[] = new PdfPCell[8];
				PdfPRow row27 = new PdfPRow(cells27);		
				cells27[0] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[0].setPaddingTop(8);
				cells27[0].setPaddingBottom(8);
				cells27[0].disableBorderSide(3);
				cells27[1] = new PdfPCell(new Paragraph(" ", blueFont2));
				cells27[1].setPaddingTop(8);
				cells27[1].setPaddingBottom(8);
				cells27[2] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[3] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[3].setColspan(2);
				cells27[5] = new PdfPCell(new Paragraph("", blueFont2));
				//cells27[5].setColspan(2);
				cells27[6] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[6].setColspan(2);
				listRow.add(row27);
		}
		}else if(uecImportantByPkPsndocb.size()>0 && uecImportantByPkPsndocb.size()<5) {
			for (int i = 0; i < uecImportantByPkPsndocb.size(); i++) {
				PdfPCell cells27[] = new PdfPCell[8];
				PdfPRow row27 = new PdfPRow(cells27);	
				UecImportantWork uecImportantWork = uecImportantByPkPsndocb.get(i);
				cells27[0] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[0].setPaddingTop(8);
				cells27[0].setPaddingBottom(8);
				cells27[0].disableBorderSide(3);
				cells27[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[1] = new PdfPCell(new Paragraph(
						(!StrUtil.isNullOrEmpty(uecImportantWork.getJoindate())?StrTraslate(uecImportantWork.getJoindate()):"")
						, blueFont));
				cells27[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[1].setPaddingTop(8);
				cells27[1].setPaddingBottom(8);
				cells27[2] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getWorkName())?uecImportantWork.getWorkName():""), blueFont));
				cells27[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
			//	cells27[2].setColspan(4);
				cells27[3] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getContextName())?uecImportantWork.getContextName():""), blueFont));
				cells27[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[3].setColspan(2);
				cells27[5] = new PdfPCell(new Paragraph("项目角色：\r\n"+
				    (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleProjectName())?uecImportantWork.getRoleProjectName():"")+"\r\n"
				    +"制定方案和方法角色：\r\n"
				    + (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleMakeName())?uecImportantWork.getRoleMakeName():"")
				    , blueFont));
				cells27[5].setHorizontalAlignment(Element.ALIGN_LEFT);// 水平居中
				cells27[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[6] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getWorkResult())?uecImportantWork.getWorkResult():""), blueFont));
				cells27[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[6].setColspan(2);
				listRow.add(row27);
		  }
			for(int i = 0; i <5- uecImportantByPkPsndocb.size(); i++) {
				PdfPCell cells27[] = new PdfPCell[8];
				PdfPRow row27 = new PdfPRow(cells27);		
				cells27[0] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[0].setPaddingTop(8);
				cells27[0].setPaddingBottom(8);
				cells27[0].disableBorderSide(3);
				cells27[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[1] = new PdfPCell(new Paragraph(" ", blueFont2));
				cells27[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[1].setPaddingTop(8);
				cells27[1].setPaddingBottom(8);
				cells27[2] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				//cells27[2].setColspan(4);
				cells27[3] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[3].setColspan(2);
				cells27[5] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[6] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[6].setColspan(2);
				listRow.add(row27);
			}
		}else {
			for (int i = 0; i< 5; i++) {
				PdfPCell cells27[] = new PdfPCell[8];
				PdfPRow row27 = new PdfPRow(cells27);	
				UecImportantWork uecImportantWork = uecImportantByPkPsndocb.get(i);
				cells27[0] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[0].setPaddingTop(8);
				cells27[0].setPaddingBottom(8);
				cells27[0].disableBorderSide(3);
				cells27[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[1] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getJoindate())?StrTraslate(uecImportantWork.getJoindate()):""), blueFont));
				cells27[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[1].setPaddingTop(8);
				cells27[1].setPaddingBottom(8);
				cells27[2] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getWorkName())?uecImportantWork.getWorkName():""), blueFont));
				cells27[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
			//	cells27[2].setColspan(4);
				cells27[3] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getContextName())?uecImportantWork.getContextName():""), blueFont));
				cells27[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[3].setColspan(2);
				cells27[5] = new PdfPCell(new Paragraph("项目角色：\r\n"+
				    (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleProjectName())?uecImportantWork.getRoleProjectName():"")+"\r\n"
				    +"制定方案和方法角色：\r\n"
				    + (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleMakeName())?uecImportantWork.getRoleMakeName():"")
				    , blueFont));
				cells27[5].setHorizontalAlignment(Element.ALIGN_LEFT);// 水平居中
				cells27[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[6] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getWorkResult())?uecImportantWork.getWorkResult():""), blueFont));
				cells27[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[6].setColspan(2);
				listRow.add(row27);
		  }
		}
		}else {
			for (int i = 0; i < 5; i++) {
				PdfPCell cells27[] = new PdfPCell[8];
				PdfPRow row27 = new PdfPRow(cells27);		
				cells27[0] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[0].setPaddingTop(8);
				cells27[0].setPaddingBottom(8);
				cells27[0].disableBorderSide(3);
				cells27[1] = new PdfPCell(new Paragraph(" ", blueFont2));
				cells27[1].setPaddingTop(8);
				cells27[1].setPaddingBottom(8);
				cells27[2] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[3] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[3].setColspan(2);
				cells27[5] = new PdfPCell(new Paragraph("", blueFont2));
				//cells27[5].setColspan(2);
				cells27[6] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[6].setColspan(2);
				listRow.add(row27);
		}
		}
		PdfPCell cells28[] = new PdfPCell[8];
		PdfPRow row28 = new PdfPRow(cells28);		
		cells28[0] = new PdfPCell(new Paragraph("近三年参加\r\n" + 
				"集团专业重\r\n" + 
				"点工作情况\r\n" + 
				"（按照重要\r\n" + 
				"性填报不超\r\n" + 
				"过5项）\r\n" + 
				"", blueFont2));
		
		cells28[0].setPaddingTop(8);
		cells28[0].setPaddingBottom(8);
		cells28[0].setRowspan(6);
		cells28[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells28[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells28[1] = new PdfPCell(new Paragraph("年度", blueFont2));
		cells28[1].setPaddingTop(8);
		cells28[1].setPaddingBottom(8);
		cells28[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells28[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells28[2] = new PdfPCell(new Paragraph("项目名称", blueFont2));
		cells28[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells28[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		//cells28[2].setColspan(4);
		cells28[3] = new PdfPCell(new Paragraph("工作内容", blueFont2));
		cells28[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells28[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells28[3].setColspan(2);
		cells28[5] = new PdfPCell(new Paragraph("工作角色", blueFont2));
		cells28[5].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells28[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells28[6] = new PdfPCell(new Paragraph("项目成果", blueFont2));
		cells28[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells28[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells28[6].setColspan(2);
		listRow.add(row28);
		boolean uecImportantJContains=true;//判断是否包含无
		if(uecImportantByPkPsndocj.size()>0) {
			for(UecImportantWork uecImportantWork:uecImportantByPkPsndocj) {
				if("无".equals(uecImportantWork.getWorkName())) {
					uecImportantJContains=false;
					break;
				}
			}
		}
		if(uecImportantJContains) {
		//近三年参加集团专业重点工作情况（按照重要性填报不超过3项）
		if(uecImportantByPkPsndocj.size()<=0) {
			for (int i = 0; i < 5; i++) {
				
				PdfPCell cells29[] = new PdfPCell[8];
				PdfPRow row29 = new PdfPRow(cells29);		
				cells29[0] = new PdfPCell(new Paragraph("", blueFont2));
				cells29[0].setPaddingTop(8);
				cells29[0].setPaddingBottom(8);
				cells29[0].disableBorderSide(3);
				cells29[1] = new PdfPCell(new Paragraph(" ", blueFont2));
				cells29[1].setPaddingTop(8);
				cells29[1].setPaddingBottom(8);
				cells29[2] = new PdfPCell(new Paragraph("", blueFont2));
				cells29[3] = new PdfPCell(new Paragraph("", blueFont2));
				cells29[3].setColspan(2);
				cells29[5] = new PdfPCell(new Paragraph("", blueFont2));
				//cells29[5].setColspan(2);
				cells29[6] = new PdfPCell(new Paragraph("", blueFont2));
				cells29[6].setColspan(2);
				listRow.add(row29);
			}
		}else if(uecImportantByPkPsndocj.size()>0 && uecImportantByPkPsndocj.size()<5) {
			for (int i = 0; i < uecImportantByPkPsndocj.size(); i++) {
				PdfPCell cells27[] = new PdfPCell[8];
				PdfPRow row27 = new PdfPRow(cells27);	
				UecImportantWork uecImportantWork = uecImportantByPkPsndocj.get(i);
				cells27[0] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[0].setPaddingTop(8);
				cells27[0].setPaddingBottom(8);
				cells27[0].disableBorderSide(3);
				cells27[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[1] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getJoindate())?StrTraslate(uecImportantWork.getJoindate()):""), blueFont));
				cells27[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[1].setPaddingTop(8);
				cells27[1].setPaddingBottom(8);
				cells27[2] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getWorkName())?uecImportantWork.getWorkName():""), blueFont));
				cells27[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
			//	cells27[2].setColspan(4);
				cells27[3] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getContextName())?uecImportantWork.getContextName():""), blueFont));
				cells27[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[3].setColspan(2);
				cells27[5] = new PdfPCell(new Paragraph("项目角色：\r\n"+
				    (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleProjectName())?uecImportantWork.getRoleProjectName():"")+"\r\n"
				    +"制定方案和方法角色：\r\n"
				    + (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleMakeName())?uecImportantWork.getRoleMakeName():"")
				    , blueFont));
				cells27[5].setHorizontalAlignment(Element.ALIGN_LEFT);// 水平居中
				cells27[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[6] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getWorkResult())?uecImportantWork.getWorkResult():""), blueFont));
				cells27[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[6].setColspan(2);
				listRow.add(row27);
		  }
			for(int i = 0; i <5- uecImportantByPkPsndocj.size(); i++) {
					
					PdfPCell cells29[] = new PdfPCell[8];
					PdfPRow row29 = new PdfPRow(cells29);		
					cells29[0] = new PdfPCell(new Paragraph("", blueFont2));
					cells29[0].setPaddingTop(8);
					cells29[0].setPaddingBottom(8);
					cells29[0].disableBorderSide(3);
					cells29[1] = new PdfPCell(new Paragraph(" ", blueFont2));
					cells29[1].setPaddingTop(8);
					cells29[1].setPaddingBottom(8);
					cells29[2] = new PdfPCell(new Paragraph("", blueFont2));
					cells29[3] = new PdfPCell(new Paragraph("", blueFont2));
					cells29[3].setColspan(2);
					cells29[5] = new PdfPCell(new Paragraph("", blueFont2));
					//cells29[5].setColspan(2);
					cells29[6] = new PdfPCell(new Paragraph("", blueFont2));
					cells29[6].setColspan(2);
					listRow.add(row29);
			}
		}else {
			for (int i = 0; i < 5; i++) {
				PdfPCell cells27[] = new PdfPCell[8];
				PdfPRow row27 = new PdfPRow(cells27);	
				UecImportantWork uecImportantWork = uecImportantByPkPsndocj.get(i);
				cells27[0] = new PdfPCell(new Paragraph("", blueFont2));
				cells27[0].setPaddingTop(8);
				cells27[0].setPaddingBottom(8);
				cells27[0].disableBorderSide(3);
				cells27[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[1] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getJoindate())?StrTraslate(uecImportantWork.getJoindate()):""), blueFont));
				cells27[1].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[1].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[1].setPaddingTop(8);
				cells27[1].setPaddingBottom(8);
				cells27[2] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getWorkName())?uecImportantWork.getWorkName():""), blueFont));
				cells27[2].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[2].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
			//	cells27[2].setColspan(4);
				cells27[3] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getContextName())?uecImportantWork.getContextName():""), blueFont));
				cells27[3].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[3].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[3].setColspan(2);
				cells27[5] = new PdfPCell(new Paragraph("项目角色：\r\n"+
				    (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleProjectName())?uecImportantWork.getRoleProjectName():"")+"\r\n"
				    +"制定方案和方法角色：\r\n"
				    + (!StrUtil.isNullOrEmpty(uecImportantWork.getRoleMakeName())?uecImportantWork.getRoleMakeName():"")
				    , blueFont));
				cells27[5].setHorizontalAlignment(Element.ALIGN_LEFT);// 水平居中
				cells27[5].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[6] = new PdfPCell(new Paragraph((!StrUtil.isNullOrEmpty(uecImportantWork.getWorkResult())?uecImportantWork.getWorkResult():""), blueFont));
				cells27[6].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
				cells27[6].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
				cells27[6].setColspan(2);
				listRow.add(row27);
		  }
		}
		
		}else {
			for (int i = 0; i < 5; i++) {
				PdfPCell cells29[] = new PdfPCell[8];
				PdfPRow row29 = new PdfPRow(cells29);		
				cells29[0] = new PdfPCell(new Paragraph("", blueFont2));
				cells29[0].setPaddingTop(8);
				cells29[0].setPaddingBottom(8);
				cells29[0].disableBorderSide(3);
				cells29[1] = new PdfPCell(new Paragraph(" ", blueFont2));
				cells29[1].setPaddingTop(8);
				cells29[1].setPaddingBottom(8);
				cells29[2] = new PdfPCell(new Paragraph("", blueFont2));
				cells29[3] = new PdfPCell(new Paragraph("", blueFont2));
				cells29[3].setColspan(2);
				cells29[5] = new PdfPCell(new Paragraph("", blueFont2));
				//cells29[5].setColspan(2);
				cells29[6] = new PdfPCell(new Paragraph("", blueFont2));
				cells29[6].setColspan(2);
				listRow.add(row29);
			}
		}
		
		
		
		PdfPCell cells30[] = new PdfPCell[8];
		PdfPRow row30 = new PdfPRow(cells30);
		cells30[0] = new PdfPCell(new Paragraph("所在部门及\r\n" + 
				"直线经理审\r\n" + 
				"核意见\r\n" + 
				"", blueFont2));
		cells30[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells30[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells30[0].setPaddingBottom(8);
		cells30[0].setPaddingTop(8);
		cells30[1] = new PdfPCell(
				new Paragraph(" \r\n"+" \r\n"+" \r\n"+"所在部门盖章                                           直线经理签字：                                                          年    月    日\r\n"+"",blueFont));
		cells30[1].setColspan(7);
	
		PdfPCell cells31[] = new PdfPCell[8];
		PdfPRow row31 = new PdfPRow(cells31);
		cells31[0] = new PdfPCell(new Paragraph("所在单位人\r\n" + 
				"力资源部材\r\n" + 
				"料审核意见\r\n" + 
				"", blueFont2));
		cells31[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells31[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells31[0].setPaddingBottom(8);
		cells31[0].setPaddingTop(8);
		cells31[1] = new PdfPCell(
				new Paragraph(" \r\n" + 
						"\r\n" + 
						"                                                                      （盖章）                                        年    月    日"
						,blueFont));
		cells31[1].setColspan(7);
		
		PdfPCell cells32[] = new PdfPCell[8];
		PdfPRow row32 = new PdfPRow(cells32);
		cells32[0] = new PdfPCell(new Paragraph("省级公司评\r\n" + 
				"审意见及推\r\n" + 
				"荐排序\r\n" + 
				"", blueFont2));
		cells32[0].setHorizontalAlignment(Element.ALIGN_CENTER);// 水平居中
		cells32[0].setVerticalAlignment(Element.ALIGN_MIDDLE);// 垂直居中
		cells32[0].setPaddingBottom(8);
		cells32[0].setPaddingTop(8);
		cells32[0].setRowspan(4);
		cells32[1] = new PdfPCell(
				new Paragraph("应到专家评委	       人，实到           人。其中赞成票	    ，反对票	    ，弃权票      。\r\n" + 
						"\r\n" + 
						"\r\n" + 
						"\r\n" + 
						"\r\n" + 
						"        评委会主任（或评审组组长）签字：                                                                             年      月      日\r\n" + 
						"",blueFont));
		cells32[1].setColspan(7);
		
		listRow.add(row30);
		listRow.add(row31);
		listRow.add(row32);
		/*String contextString = "说明：\r\n" + "\r\n"+
				"1.近三年参加本单位专业工作情况填写注意事项：（包括本单位及集团）\r\n" + 
				"(1)项目/工作内容: 包括实施专业项目、制定专业方案、研究专业标准等。\r\n" + 
				"(2)工作角色: 项目角色包括：组长、副组长、组员。\r\n" + 
				"                           制定方案和方法角色包括：牵头负责、主要参与者、配合者。\r\n" + 
				""
				;
		
		Paragraph contextnew = new Paragraph(contextString, blueFont);*/
		
		// 与上一段落（标题）的行距
		// contextnew.setSpacingBefore(10);
		// 设置第一行空的列数（缩进）
		// contextnew.setFirstLineIndent(15);
		// 把表格添加到文件中
		document.add(table);
		//document.add(contextnew);
		// 5.关闭文档
		document.close();
		
		/**
		 * 
		 * 通过浏览器下载
		 */
		if (os != null) {
			byte[] bs = os.toByteArray();
			os.close();
			return bs;
		}
		return null;
	}
   public PdfPCell changeHeight(PdfPCell cell) {
	   cell.setMinimumHeight(2f);
	 return cell;  
   }
   
   /**
	 * 学位
	 * @return
	 */
	public String getPkDegreeName(String pkdegree) {
		if (!StrUtil.isNullOrEmpty(pkdegree)) {
			String sql = "SELECT * FROM UEC_BD_DEFDOC WHERE PK_DEFDOC = ? ";
			List<Object> params = new ArrayList<Object>();
			params.add(pkdegree);
			List<UecBdDefdoc> list = DefaultDaoFactory.getDefaultDao().jdbcFindList(sql,
					params, UecBdDefdoc.class);
			if (list != null && list.size() > 0) {
				return list.get(0).getName();
			}
		
		}
		return null;
	}
	 public String dataTraslate(String data) throws ParseException {
	    	SimpleDateFormat df=new SimpleDateFormat("yyyy-mm");
	    	Date parse = df.parse(data);
	    	String newDate = df.format(parse);
	    	newDate=newDate.replace("-", ".");
	    	return newDate;
	    }
	 public String StrTraslate(Date data) throws ParseException {
		 SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd");
		 String newDate = df.format(data);
		 newDate=newDate.substring(0,4)+"-"+newDate.substring(5,7);
		 newDate=newDate.replace("-", ".");
		 return newDate;
	 }
	 public boolean getLogDown(LogDown logdown) throws ParseException {
		 boolean flag=false;
		 LogDown findLogDownByLogDown = logDownManager.findLogDownByLogDown(logdown);
		 if(findLogDownByLogDown!=null) {
			 flag=true;
			 logDown=findLogDownByLogDown;
			 talentCategory=logDown.getTalentname();
			 childTalent=logDown.getChildtalentname();
		 }
		 return flag;
	 }
	 /**
	  * 日期格式转换   2019/2/1  -----》2019-02-01
	  * @param data
	  * @return
	  * @throws ParseException
	  */
	 public String StrTraslateFormat(String data) throws ParseException {
		 SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd");
		 data=data.replace("/", "-");
		 Date newDate = df.parse(data);
		 data=df.format(newDate);
		 data=data.substring(0,4)+"-"+data.substring(5,7);
		 data=data.replace("-", ".");
		 return data;
	 }
	 
	 public void getList() {
		//近三年参加专业工作情况(本单位)
		 uecImportantByPkPsndocbList = uecImportantWorkManager.findUecImportantByPkPsndoc(staffAndOutStaff,"本单位");
		//近三年参加专业工作情况(集团)
		uecImportantByPkPsndocjList = uecImportantWorkManager.findUecImportantByPkPsndoc(staffAndOutStaff,"集团");
		//论文专著
		uecArticleByPkPsndocList = uecArticleManager.findUecArticleByPkPsndoc(staffAndOutStaff);
		//创新结果
		uecInnovationByPkPsndocList = uecInnovationManager.findUecInnovationByPkPsndoc(staffAndOutStaff);
	 }
}